I'm having a strange problem with a query. The query looks like this:
select ClientName, ConversionJournal, UnsubSQL, RecordModDateField, FailedMailJournal, idField, idIsNumeric, TextOnlySQL, FailedMailSQL, MailJournal, JournalDBType, JournalConnString, ClientDBType, ClientConnString, EmailField, PrimaryAddressTable, NetPathToAttachLib, MessagesSent,LowerLimit,MidLimit,UpperLimit,BaseCost,MidCost1,MidCost2,MinCost,ErrorsTo,BouncesTo,POPServer,PopAccount,PopPW,MailServerIP,SystemMessagesFrom, WebSiteName from clients, SMTPservers where SMTPservers.id=clients.PopCleaner_SMTPServers_fk and clientid=1
It runs cleanly and returns a single record in MySQL Query Browser. But in my application it throws a System.IndexoutofrangeException error: "Index was outside the bounds of the array" in Corelab.MySQL.dll.
The bizarre thing is that I can take the same query, change the clientid to a value other than 1 (the last character in the sql) and it works perfectly. This same query also works under VB.Net 1.1 with Visual Studio 2003.
Art
Query Won't Run
Query Won't Run - Additional Info
I'm running MySQLDirect .NET 3.20.6. It appears I'm running Version 2.0.50727 of the .Net framework.
In my production environment where this problem occurs I'm running MySQL Version 4.1.9nt-max-log. When I access a local copy of this database on my development system, I don't have this problem. On this development environment I'm running MySQL 4.1.9nt
I've noticed that this problem arises appears to be related to delimiters and spacing. A query reading "select * from xxx where id=1" fails but if I insert a space between the = and the 1, the query runs. Similarly, if I wrap the 1 in single quotes (even though id is of type integer), the query works. I've seen the same thing in a join syntax. For example if the syntax reads "where xxx.id=yyy.id_fk" it fails but if I insert spaces around the = the problem goes away.
Hope this helps.
Art
In my production environment where this problem occurs I'm running MySQL Version 4.1.9nt-max-log. When I access a local copy of this database on my development system, I don't have this problem. On this development environment I'm running MySQL 4.1.9nt
I've noticed that this problem arises appears to be related to delimiters and spacing. A query reading "select * from xxx where id=1" fails but if I insert a space between the = and the 1, the query runs. Similarly, if I wrap the 1 in single quotes (even though id is of type integer), the query works. I've seen the same thing in a join syntax. For example if the syntax reads "where xxx.id=yyy.id_fk" it fails but if I insert spaces around the = the problem goes away.
Hope this helps.
Art
We repeated test on mysql 4.1.9 (mysqld-nt) and on mysql 4.1.7 (mysqld-max-nt) in standard configuration and still cannot reproduce the problem.
We think the problem might be in your server configuration (you told us that you cannot reproduce error in development environment). Please inspect server configuration files and compare them with default configuration files. If you find any specific option which differs from default one please let us know so we can test it.
We think the problem might be in your server configuration (you told us that you cannot reproduce error in development environment). Please inspect server configuration files and compare them with default configuration files. If you find any specific option which differs from default one please let us know so we can test it.