mysql metadata from asp

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jimmy

    mysql metadata from asp

    Hi, I uses mysql 4.1 on win 2003 server.

    Jeg use asp(active server pages) to connect to mysql

    I have a problem collecting metadata about what type a colum is. My kode
    looks like this:

    sql="select * from Person"
    Set rs=db.execute(s ql)
    antalkolonner = CInt(rs.fields. count - 1)
    rsvr(I) = rs.fields(I).ty pe
    Dim rsvr()
    Redim rsvr(antalkolon ner)
    For I = 0 to antalkolonner
    rsvr(I) = rs.fields(I).ty pe
    response.write rsvr(I) & "<br>"
    next

    The code works fine, I get "200" from varchar, "3" for numbers,
    "133" for dates, and "16" for boolean. but for both varchar and mediumtext I
    get "200". Is there anyway I can get a to know if it is varchar or
    mediumtext! I used to use Access and here I got different numbers for text
    and memo!

    Anybody?





  • swdev1

    #2
    Re: mysql metadata from asp

    Hullo Jimmy.
    Got VS 6 EE floating around anywhere?
    Install VFP 6 from CD 1, and then
    1. Make a connection string or System DSN to your database
    2. use sqltables() and sqlcolumns() functions.
    If you want to stick to ASP development and IDE's , install Visual InterDev
    and make a database project and study the #'s returned ..
    hth - mondo regards [Bill]
    --
    William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
    email.
    Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
    Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
    Mondo Cool Satellites -> http://www.efgroup.net/sat
    mySql / VFP / MS-SQL

    "Jimmy" <escherich@vip. cybercity.dk> wrote in message
    news:dZoUb.8510 1$jf4.5411361@n ews000.worldonl ine.dk...[color=blue]
    > Hi, I uses mysql 4.1 on win 2003 server.
    >
    > Jeg use asp(active server pages) to connect to mysql
    >
    > I have a problem collecting metadata about what type a colum is. My kode
    > looks like this:
    >
    > sql="select * from Person"
    > Set rs=db.execute(s ql)
    > antalkolonner = CInt(rs.fields. count - 1)
    > rsvr(I) = rs.fields(I).ty pe
    > Dim rsvr()
    > Redim rsvr(antalkolon ner)
    > For I = 0 to antalkolonner
    > rsvr(I) = rs.fields(I).ty pe
    > response.write rsvr(I) & "<br>"
    > next
    >
    > The code works fine, I get "200" from varchar, "3" for numbers,
    > "133" for dates, and "16" for boolean. but for both varchar and mediumtext[/color]
    I[color=blue]
    > get "200". Is there anyway I can get a to know if it is varchar or
    > mediumtext! I used to use Access and here I got different numbers for text
    > and memo!
    >
    > Anybody?
    >
    >
    >
    >
    >[/color]


    Comment

    • swdev1

      #3
      Re: mysql metadata from asp

      Hullo Jimmy.
      Got VS 6 EE floating around anywhere?
      Install VFP 6 from CD 1, and then
      1. Make a connection string or System DSN to your database
      2. use sqltables() and sqlcolumns() functions.
      If you want to stick to ASP development and IDE's , install Visual InterDev
      and make a database project and study the #'s returned ..
      hth - mondo regards [Bill]
      --
      William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
      email.
      Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
      Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
      Mondo Cool Satellites -> http://www.efgroup.net/sat
      mySql / VFP / MS-SQL

      "Jimmy" <escherich@vip. cybercity.dk> wrote in message
      news:dZoUb.8510 1$jf4.5411361@n ews000.worldonl ine.dk...[color=blue]
      > Hi, I uses mysql 4.1 on win 2003 server.
      >
      > Jeg use asp(active server pages) to connect to mysql
      >
      > I have a problem collecting metadata about what type a colum is. My kode
      > looks like this:
      >
      > sql="select * from Person"
      > Set rs=db.execute(s ql)
      > antalkolonner = CInt(rs.fields. count - 1)
      > rsvr(I) = rs.fields(I).ty pe
      > Dim rsvr()
      > Redim rsvr(antalkolon ner)
      > For I = 0 to antalkolonner
      > rsvr(I) = rs.fields(I).ty pe
      > response.write rsvr(I) & "<br>"
      > next
      >
      > The code works fine, I get "200" from varchar, "3" for numbers,
      > "133" for dates, and "16" for boolean. but for both varchar and mediumtext[/color]
      I[color=blue]
      > get "200". Is there anyway I can get a to know if it is varchar or
      > mediumtext! I used to use Access and here I got different numbers for text
      > and memo!
      >
      > Anybody?
      >
      >
      >
      >
      >[/color]


      Comment

      • swdev1

        #4
        Re: mysql metadata from asp

        Hullo Jimmy.
        Got VS 6 EE floating around anywhere?
        Install VFP 6 from CD 1, and then
        1. Make a connection string or System DSN to your database
        2. use sqltables() and sqlcolumns() functions.
        If you want to stick to ASP development and IDE's , install Visual InterDev
        and make a database project and study the #'s returned ..
        hth - mondo regards [Bill]
        --
        William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
        email.
        Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
        Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
        Mondo Cool Satellites -> http://www.efgroup.net/sat
        mySql / VFP / MS-SQL

        "Jimmy" <escherich@vip. cybercity.dk> wrote in message
        news:dZoUb.8510 1$jf4.5411361@n ews000.worldonl ine.dk...[color=blue]
        > Hi, I uses mysql 4.1 on win 2003 server.
        >
        > Jeg use asp(active server pages) to connect to mysql
        >
        > I have a problem collecting metadata about what type a colum is. My kode
        > looks like this:
        >
        > sql="select * from Person"
        > Set rs=db.execute(s ql)
        > antalkolonner = CInt(rs.fields. count - 1)
        > rsvr(I) = rs.fields(I).ty pe
        > Dim rsvr()
        > Redim rsvr(antalkolon ner)
        > For I = 0 to antalkolonner
        > rsvr(I) = rs.fields(I).ty pe
        > response.write rsvr(I) & "<br>"
        > next
        >
        > The code works fine, I get "200" from varchar, "3" for numbers,
        > "133" for dates, and "16" for boolean. but for both varchar and mediumtext[/color]
        I[color=blue]
        > get "200". Is there anyway I can get a to know if it is varchar or
        > mediumtext! I used to use Access and here I got different numbers for text
        > and memo!
        >
        > Anybody?
        >
        >
        >
        >
        >[/color]


        Comment

        Working...