473,503 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2746
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
908
by: Keith | last post by:
I am having a problem creating a many-to-many-to-many type relationship. It works fine, but when I create a view to query it and test it, it does not generate the results I expected. Below...
3
1774
by: Pi | last post by:
Hi guys, I have a stored procedure that I will subsequently post below this message. What the stored procedure does is, it reads some specific tables in a database and created XML off it. The...
4
2077
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
30
4515
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
5
2176
by: hfk0 | last post by:
Hi, I'm new to ASP.net, SQL Server and visual studio.net, and I'm having problem inserting and storing data from a web form to a SQL database. I created a simple ASP.NET web form, a simple SQL...
1
1159
by: Islamegy® | last post by:
When i call stored procedure which have an output paramter, t'm unable to get the value How could i fix it?? here is the method.... ---------------------------- userid = 0; SqlParameter...
11
2883
by: panic attack | last post by:
Hello everbody, Our system is using Sql Server 2000 on Windows XP / Windows 2000 We have a text file needs to be imported into Sql Server 2000 as a table. But we are facing a problem which is,...
1
1722
by: webandwe | last post by:
Hi The code below I took from a postgre file and convert it with a program to a mysql. Once i tried to import it to mysql it gave me an error and when i past in a php file to upload it trough a...
1
1640
by: ChrisFrohlich | last post by:
ASP.NET 2.0 with Text DataTypes: I've got a similar question going in the SQL group, but I was wondering if anyone has successfully implemented reading/writing character data from a Text datatype...
2
1887
pradeepjain
by: pradeepjain | last post by:
I have a table like this +---------------------------+--------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key |...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.