logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: Value of TEXT field disappears when read more than once: msg#00011

db.mysql.odbc

Subject: Re: Value of TEXT field disappears when read more than once

Ranjit Singh Sandhu wrote:

Hello,
We are having a strange problem.
We have Windows 2000, Visual Basic 6.0 (SP 6), MySql 4.0, MyODBC 3.51.09, ADO
2.6

In one the cases when we read a value of a TEXT column of MySql table, it
disappears after
the first show.
I had seen one similar post by Adam Milazzo on 9 April 2004.
But no replies.

This is common to ADO (I believe). Since "text" fields are so huge, to conserve memory, ADO jettisons that memory once you refer to it. What I usually do is something like this...

Dim varTextFld as Variant
varTextFld = myRecordset.Field["myField"].Value

From that point on, you can do other manipulations as needed, such as...

If Is_Null(varTextFld) Then

...and...

varTextFld = Replace(varTextFld, vbCrLf, "<br />")

Hope that helps - ADO works the same way with Access (the "memo" field type) and the "text" field type with SQL Server.


Daniel J. Summers danieljs@xxxxxxxxxxx


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo