recordset values reset tu null after use as an argument in a function call
"Jos Verhoeff" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.odbc |
|---|---|
| Message-ID | <006401c88f3b$894768a0$9bd639e0$@nl> |
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]