Query Won't Run

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
akrumsee
Posts: 4
Joined: Mon 19 Dec 2005 21:42

Query Won't Run

Post by akrumsee » Mon 19 Dec 2005 21:48

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

Serious

Post by Serious » Tue 20 Dec 2005 07:22

Please send us small test project if possible to reproduce the problem; include definition and dump of your own database objects used in query. Do not use third party components.

If it is impossible for you to create test project please send us a piece of your code where the error occurs.

Serious

Post by Serious » Wed 21 Dec 2005 16:56

I tested your project with MySQLDirect .NET 3.20.5 and found no problems with it.
Please specify your MySQLDirect .NET version, MySQL Server version and .NET Framework version.

akrumsee
Posts: 4
Joined: Mon 19 Dec 2005 21:42

Query Won't Run - Additional Info

Post by akrumsee » Wed 28 Dec 2005 16:37

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

Serious

Post by Serious » Thu 29 Dec 2005 09:33

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.

Post Reply