re String Validation/ or something...

R

Ray Godfrey

Hi there Bob,

To answer your questions:

1. I'm using MS SQL Server V8.0
2. Yeah there will be money, date/time data. All the DB will be
money/datetime.

Its pretty tricky. Using the code Ray gave me and a bot of my own I
was able to populate the DB to an extent. The extent being *one*
insert per loop. So I ended up filling one field in a row, moving to
the next row and filling another field etc.

I've written out what I think *may* work in pseudocode but I'm new to
asp and can't turn it into code proper.

something like

<code>

if readline includes "[" then
this is a *tablename*
so until next "["
all readlines are "fieldame = data"
-->smlArray = split(readline, =)
-->store all smlArrays into bigArray
-->so until loop finds another "["
-->bigarray should be bigarray(smlarray0, smallarray1,smlarray2, etc)
then using bigarray construct insert as
insert into *tablename*(bigarray.smlarray1(0), bigarray.smlarray1(0),
etc)
values (bigarray.smlarray1(1), bigarray.smlarray1(1),etc)

</code>

Or maybe I'm completely wrong.
I don't know if said or if i merely implied but there a numerous
different tables. The file *will* hold data that will reflect the DBs
structure.

I'll post some more sample data in a differnt post, as this one seems
a tad long for usenet!

I appreciate any help you can give me.

P


Bob said:

Disregard my previous reply. I see what you're after.
1. What is the type and version of database you are using.
2. Your example data is all character (string) data. Will there be
numeric
or date/time data provided by these text files? Will the corresponding
table
fields be the same datatype (numeric or datetime)? Or are all the
fields
character fields?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top