473,789 Members | 2,957 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.CreateOb ject("ADODB.Con nection")
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( "Descriptio n:" & a & "")
Response.Write( "Descriptio n 2: " & rsTeaser("Descr iption ") & "")

Reading rsTeaser(„Besch reibung“) 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 2765
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********@hot mail.com> wrote in message
news:99******** *************** **@posting.goog le.com...
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.CreateOb ject("ADODB.Con nection")
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( "Descriptio n:" & a & "")
Response.Write( "Descriptio n 2: " & rsTeaser("Descr iption ") & "")

Reading rsTeaser(„Besch reibung“) 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 if the DDL for the tables and the SQL for the view.
3
1790
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 problem comes in when the data is bigger than a few hundred/ thousand characters. The data is truncated and the XML file is not fully made.
4
2093
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. Each question is displayed and answered, then result written to a SQL table. Then the next question is read from a table and displayed using the load_page event again. The questions display and function perfectly. The user anwers the question...
30
4606
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 corresponding field in the lookup table. In my data table we store the ID in what I will call the 'key' field. == Description of the desired operation:
5
2206
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 database, a database connection (using the SQlDataSource Web Control from the Toolbox), and created the following stored procedure in Visual Studio.Net 2005:
1
1174
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 collection = new SqlParameter { new SqlParameter("@ID",DBNull.Value),
11
2945
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, Sql Server claims that it has a character size limit ( which is 8060 ) so it cant procceed the import operation if the text file has a record bigger then 8060. The records , in the text file, have a size bigger then 8060. So we wont be able to...
1
1741
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 php file it stats I have loaded the information into the DB but i don't see any tables in the DB. Here is the code as it comes from my plain *.txt file. Any suggestions? CREATE TABLE categories ( record int(11) auto_increment NOT NULL, ...
1
1657
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 column in SQL 2000. I know there's a Varchar(MAX) feature in SQL2005, but my budget mocks me right now and I need to do it in SQL 2K. Situation: I'm building a resume DB, and for ease of input, I'd really like to be able to use a single...
2
1902
pradeepjain
by: pradeepjain | last post by:
I have a table like this +---------------------------+--------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------------------+--------------------------+------+-----+---------+----------------+ | patient_id | int(5) unsigned zerofill | NO | PRI | NULL | auto_increment | | Surname ...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.