PC Review


Reply
Thread Tools Rate Thread

Access mysql longtext field from excel

 
 
hheckner
Guest
Posts: n/a
 
      7th Apr 2009
Hi

In my result set i have one column of (mysql type longtext) which i
cannot read from my vbscript

myRecordSet.Fields.Item(col).value is Null

although the watch point on the resultset shows the right text string
stored in the database.

Any ideas?

Best regards
Hannes
 
Reply With Quote
 
 
 
 
joel
Guest
Posts: n/a
 
      7th Apr 2009
If the watch is getting data, then there is data. Yo may have a lot of white
character yo are not seeing. Try adding this line of code

msgbox("The length of the cell is : "len(myRecordSet.Fields.Item(col).value))

Another possiblity is the object is not text but some sort of picture?

"hheckner" wrote:

> Hi
>
> In my result set i have one column of (mysql type longtext) which i
> cannot read from my vbscript
>
> myRecordSet.Fields.Item(col).value is Null
>
> although the watch point on the resultset shows the right text string
> stored in the database.
>
> Any ideas?
>
> Best regards
> Hannes
>

 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      7th Apr 2009
In your connection string - what driver are you specifying?

If you're using out of the box ODBC longtext won't be supported.
 
Reply With Quote
 
hheckner
Guest
Posts: n/a
 
      8th Apr 2009
On 7 Apr., 21:47, "gimme_this_gimme_t...@yahoo.com"
<gimme_this_gimme_t...@yahoo.com> wrote:
> In your connection string - what driver are you specifying?
>
> If you're using out of the box ODBClongtextwon't be supported.


Hi,

we use the following connection string:
oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & curPreset.host &
";USER=" & user & ";PASSWORD=" & password & ";database=" &
curPreset.db & ";"

Any alternatives?

Thanks
Hannes
 
Reply With Quote
 
hheckner
Guest
Posts: n/a
 
      8th Apr 2009
On 7 Apr., 20:00, joel <j...@discussions.microsoft.com> wrote:
> If the watch is getting data, then there is data. *Yo may have a lot ofwhite
> character yo are not seeing. *Try adding this line of code
>
> msgbox("The length of the cell is : "len(myRecordSet.Fields.Item(col).value))
>
> Another possiblity is the object is not text but some sort of picture?
>
> "hheckner" wrote:
> > Hi

>
> > In my result set i have one column of (mysqltypelongtext) which i
> > cannot read from my vbscript

>
> > myRecordSet.Fields.Item(col).value is Null

>
> > although the watch point on the resultset shows the right text string
> > stored in the database.

>
> > Any ideas?

>
> > Best regards
> > Hannes


No there is text in there. No pictures.
Funny thing is that we can see the text string in the debugger, but we
cannot get it work in the script.
 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      8th Apr 2009
5.1 is fairly recent.

It's likely that the value must be read as a stream.

I googled and found this link.

Try something like this:

http://www.aspfree.com/c/a/Database/...ream-Object/2/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked excel field from access form field - help required. fishy Microsoft Excel Programming 1 5th Apr 2008 02:43 PM
Reading Access Form Field and Copy to Excel Field =?Utf-8?B?S2V2aW5LQk0=?= Microsoft Excel Programming 0 13th Jul 2007 07:16 PM
using an Access Form checkbox with a mysql field which is 0/1 armyofda12monkeys Microsoft Access Form Coding 2 6th Jun 2006 03:03 AM
MySQL & BLOB field retrieving pmz Microsoft C# .NET 2 4th Feb 2006 02:01 AM
Import Excel text field to Access date field djh Microsoft Access External Data 3 21st May 2004 04:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:34 PM.