472,807 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,807 software developers and data experts.

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 2713
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
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
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
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
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
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
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
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
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
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
pradeepjain
by: pradeepjain | last post by:
I have a table like this +---------------------------+--------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key |...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.