re String Validation/ or something...

Discussion in 'ASP General' started by Ray Godfrey, Apr 20, 2005.

  1. Ray Godfrey

    Ray Godfrey Guest

    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?
    Ray Godfrey, Apr 20, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    4
    Views:
    473
    Guest
    Oct 13, 2004
  2. Pekka Järvinen
    Replies:
    2
    Views:
    657
    Richard Tobin
    Apr 29, 2008
  3. Ray Godfrey

    string validation/ or something...

    Ray Godfrey, Apr 19, 2005, in forum: ASP General
    Replies:
    11
    Views:
    217
    Bob Barrows [MVP]
    Apr 25, 2005
  4. Replies:
    4
    Views:
    206
    Tad McClellan
    Jun 1, 2007
  5. Replies:
    9
    Views:
    151
Loading...

Share This Page