RE: recordset values reset tu null after use as an argument in a function call
"Bonnett, John" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.odbc |
|---|---|
| Message-ID | <[email protected]> |
I wouldn't pass rs("fieldname").value as an argument to the function.
Grab its value in a local string and pass that. I do agree though that
it should not make any difference.
John Bonnett
-----Original Message-----
From: Jos Verhoeff [mailto:[email protected]]
Sent: Wednesday, 26 March 2008 10:49 PM
To: [email protected]
Subject: recordset values reset tu null after use as an argument in a
function call
Hi,
Since I upgraded to MyODBC 3.51.24 (MySQL 5 release running) I have the
following problem in a vb dll that has been running for a number of
years now.
I populate a recordset
Function check(S as string)
Return true or false
End function
Function dosomething
Dim rs
>>Populate rs
Dosomething = ""
If check(rs("fieldname").value) then
dosomething = rs("fieldname").value
End if
End function
At line If y(rs("fieldname").value) then, the value of rs("fieldname")
has a value
At line X = rs("fieldname").value the value is reset to null
The call to function check resets it to null
Check itself does nothing with the field value but analyse its contents
Whether I do byval S or byref S makes no difference.
What does make a difference is the database itself.
I have a number of databases, all with the same structure, and for some
this happens, for some it does not.
With the previous MyODBC versions (3.51.20 I believe) this did not
happen, also not with MySQL 4.0 and 4.1
I can check my code and recompile, but I would like to know what I am
watching for.
Greetings,
Jos Verhoeff
CERIUM - Internet Technology
Beurs - World Trade Center - Suite 273
Beursplein 37 (bezoekadres)
Postbus 30006
3001 DA Rotterdam
T : 010 2056700
F : 010-2051938
I : <BLOCKED::http://www.cerium.nl/> www.CERIUM.nl Alg. @ :
<BLOCKED::mailto:[email protected]> [email protected]
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/[email protected]