Receiving values of numeric type "byte" gives SQL Error, crashes Igor.
| Project: | SQL XOP |
| Version: | IGOR.6.00.x-1.0-beta-1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | hrodstein |
| Status: | closed |
Using an MS Access database, creating a field of type "Number" and size "Byte" will give an SQL error in Igor when retrieving the column, and then crash Igor (sometimes several seconds later), if the value in the field is >127. MS Access will let you put in any integer 0<=x<256, so I suspect the problem is that Igor thinks it is going to get a signed byte -128<=x<=127, and MS Access is giving an unsigned byte. I can solve this by converting my field to Integer (0<=x<=65535) in MS Access.
Updates
| Assigned to: | » hrodstein |
I don't think its a signed/unsigned problem that is causing the crash.
Each ODBC driver has its own peculiarities. I have tested only with MySQL and MS Server Express.
I need to look into this. I've never used MS Access. If you have something set up that would help me to test it, please send to support@wavemetrics.com or you can try to send it as an attachment through IgorExchange - I've never tried that.
Now that I think of it, I don't have a copy of MS Access but I guess I'll have to get one.
Just as a point of information, it should be possible to attach a file to a follow up without difficulty. Just look for the "File attachment:" box below the "Description:" field.
However, only certain extensions are allowed on files that are attached. This is to prevent someone from uploading a malicious file that might execute on someone else's computer or the web server itself. I've white listed certain archive and Igor related extensions, but I can't white list every possible non-harmful extension. The best thing to do if you can't upload a file with a certain extension is to compress it into a .zip or .dmg file. Alternately, you can rename the file. For example,
myfile.mdb could be renamed to myfile.mdb_.txt
If you decide to upload the file on IgorExchange and have any problems, don't hesitate to contact me via http://www.igorexchange.com/contact
| Attachment: | Byte Field Test.pxp (72.88 KB) |
Rick:
What version of Access are you using?
How did you try to retrieve the field?
Can you send me an Access database with a byte field? Windows comes with an "MS Access Database (*.mdb)" driver which I believe will allow me to access the Access database directly from a file.
Is it possible for me to access your Access DB remotely?
I've attached a test experiment that tests a byte (tinyint) field using MySQL. The experiment will need to be tweaked for MS Access. I don't know if you can download the file from IgorExchange. If not I can email it to you.
| Status: | active | » fixed |
The problem was a failure to handle the ODBC SUCCESS_WITH_INFO result. This was fixed in release 1.00B02. Thanks Rick for helping to track this down.
| Status: | fixed | » closed |
