469,640 Members | 1,563 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Problem reading VARCHAR and Text-Fields and ADO

Hello all,

at first, sorry for my bad English, I’ll give my best 

We have a strange problem reading Text- and VarChar-Fields.

Our configuration:
-Windows 2003 Server
-MySQL Server 3.23.36
-MyODBC 3.51
-ASP & ADO

We are querying a database with ADO and store the data in an
ADO-Recordset.
Then, if we read a textfield from the Recordset the first time, we get
back the data, but reading the field a second time, it returns NULL!

Sample Code:

set db = Server.CreateObject("ADODB.Connection")
db.Open "dsn=" & hdbdsn & ";uid="& hdbuid &";pwd=" & hdbpwd & ""
sql = "SELECT * FROM tbl"
Dim rsTeaser set rsTeaser = db.Execute(sql)
Dim a
a = cstr(rsTeaser("Description"))
Response.Write("Description:" & a & "")
Response.Write("Description 2: " & rsTeaser("Description ") & "")

Reading rsTeaser(„Beschreibung“) the first time, works
fine. But reading the same field again, we get back NULL.
To access MySQL we’re using MyODBC 3.51 with the default
options.

Hope someone can help us!

Thanks and kindest regards
Boris Wilhelms
Jul 20 '05 #1
1 2594
Boris,

Would that be MySQL Linux?
Do you have any type BigInt key fields?

We have found the MySQL ODBC driver to be quite useless when dealing with a
BigInt key field. The only workaround we have found is avoidance. We don't
use BigInt in MySQL tables. Problems similar to the ones you mention
vanished once we adopted this policy.

Thomas Bartkus

"Boris Wilhelms" <wi********@hotmail.com> wrote in message
news:99*************************@posting.google.co m...
Hello all,

at first, sorry for my bad English, I’ll give my best 

We have a strange problem reading Text- and VarChar-Fields.

Our configuration:
-Windows 2003 Server
-MySQL Server 3.23.36
-MyODBC 3.51
-ASP & ADO

We are querying a database with ADO and store the data in an
ADO-Recordset.
Then, if we read a textfield from the Recordset the first time, we get
back the data, but reading the field a second time, it returns NULL!

Sample Code:

set db = Server.CreateObject("ADODB.Connection")
db.Open "dsn=" & hdbdsn & ";uid="& hdbuid &";pwd=" & hdbpwd & ""
sql = "SELECT * FROM tbl"
Dim rsTeaser set rsTeaser = db.Execute(sql)
Dim a
a = cstr(rsTeaser("Description"))
Response.Write("Description:" & a & "")
Response.Write("Description 2: " & rsTeaser("Description ") & "")

Reading rsTeaser(„Beschreibung“) the first time, works
fine. But reading the same field again, we get back NULL.
To access MySQL we’re using MyODBC 3.51 with the default
options.

Hope someone can help us!

Thanks and kindest regards
Boris Wilhelms

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Pi | last post: by
4 posts views Thread by Bass Pro | last post: by
30 posts views Thread by dbuchanan | last post: by
1 post views Thread by Islamegy® | last post: by
1 post views Thread by webandwe | last post: by
pradeepjain
2 posts views Thread by pradeepjain | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.