469,271 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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(sql)
antalkolonner = CInt(rs.fields.count - 1)
rsvr(I) = rs.fields(I).type
Dim rsvr()
Redim rsvr(antalkolonner)
For I = 0 to antalkolonner
rsvr(I) = rs.fields(I).type
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?

Jul 19 '05 #1
3 1293
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" <es*******@vip.cybercity.dk> wrote in message
news:dZ*********************@news000.worldonline.d k...
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(sql)
antalkolonner = CInt(rs.fields.count - 1)
rsvr(I) = rs.fields(I).type
Dim rsvr()
Redim rsvr(antalkolonner)
For I = 0 to antalkolonner
rsvr(I) = rs.fields(I).type
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?


Jul 19 '05 #2
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" <es*******@vip.cybercity.dk> wrote in message
news:dZ*********************@news000.worldonline.d k...
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(sql)
antalkolonner = CInt(rs.fields.count - 1)
rsvr(I) = rs.fields(I).type
Dim rsvr()
Redim rsvr(antalkolonner)
For I = 0 to antalkolonner
rsvr(I) = rs.fields(I).type
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?


Jul 19 '05 #3
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" <es*******@vip.cybercity.dk> wrote in message
news:dZ*********************@news000.worldonline.d k...
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(sql)
antalkolonner = CInt(rs.fields.count - 1)
rsvr(I) = rs.fields(I).type
Dim rsvr()
Redim rsvr(antalkolonner)
For I = 0 to antalkolonner
rsvr(I) = rs.fields(I).type
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?


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Cathy Hui | last post: by
175 posts views Thread by Sai Hertz And Control Systems | last post: by
2 posts views Thread by simen.haugen | last post: by
35 posts views Thread by Nosferatum | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.