dbTalk Databases Forums  

ODBC Filemaker 6 Unlimited

comp.databases.filemaker comp.databases.filemaker


Discuss ODBC Filemaker 6 Unlimited in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default ODBC Filemaker 6 Unlimited - 08-04-2005 , 08:14 AM






Hi all,

I'm having a problem where Sql sent to FM through ODBC is causing the
program sending the Sql to shutdown.

The query is:

SELECT *
FROM TABLE
WHERE ID = 235 OR ID = 256

It would seem simple, but its not. MS Query does something to the Sql
it sends before it sends it, so it seems to work (although entering
that exact sql to send in MS Query causes it to close as well).

Any ideas as to why such a simple thing would cause such problems?

Thanks
Andy


Reply With Quote
  #2  
Old   
42
 
Posts: n/a

Default Re: ODBC Filemaker 6 Unlimited - 08-04-2005 , 12:23 PM






In article <1123161258.095439.112610 (AT) g14g2000cwa (DOT) googlegroups.com>,
ajohnstone (AT) capcitypress (DOT) com says...
Quote:
Hi all,

I'm having a problem where Sql sent to FM through ODBC is causing the
program sending the Sql to shutdown.

The query is:

SELECT *
FROM TABLE
WHERE ID = 235 OR ID = 256

It would seem simple, but its not. MS Query does something to the Sql
it sends before it sends it, so it seems to work (although entering
that exact sql to send in MS Query causes it to close as well).

Any ideas as to why such a simple thing would cause such problems?
Wasn't there just a thread about this? Something about using
parenthesis...

e.g.

WHERE ((ID=235) OR (ID=256))


Reply With Quote
  #3  
Old   
Andy
 
Posts: n/a

Default Re: ODBC Filemaker 6 Unlimited - 08-04-2005 , 12:40 PM



Yes, that was my thread. I thought I fixed it, but using the ()s still
does not help.

Andy


Reply With Quote
  #4  
Old   
Andy
 
Posts: n/a

Default Re: ODBC Filemaker 6 Unlimited - 08-04-2005 , 12:52 PM



I discovered something else... its not executing the Sql that is a
problem,
its moving to the last row. (I'm using C# IDataReader.Read().. the
Read actually is the line the program closes on).

Andy


Reply With Quote
  #5  
Old   
42
 
Posts: n/a

Default Re: ODBC Filemaker 6 Unlimited - 08-04-2005 , 04:01 PM



In article <1123177964.552094.246390 (AT) o13g2000cwo (DOT) googlegroups.com>,
ajohnstone (AT) capcitypress (DOT) com says...
Quote:
I discovered something else... its not executing the Sql that is a
problem,
its moving to the last row. (I'm using C# IDataReader.Read().. the
Read actually is the line the program closes on).
So... you've got the data in a datatable/dataset?


Reply With Quote
  #6  
Old   
Andy
 
Posts: n/a

Default Re: ODBC Filemaker 6 Unlimited - 08-05-2005 , 11:16 AM



A datareader... I copy the data from the reader into my own objects.

The problem actually occurs at the point then the Read method should
return false, indicating that there are no more rows. Instead of
returning false, my application exits.

The odd thing is that i can hardcode a simple sql statement with an OR
clause, and that works.

The application builds a sql statement (which looks correct to me), but
sets the parameters using IDataParameter objects.

So either there is something wrong with the Sql, or there's a problem
when using parameters with an IDbCommand.

Andy


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.