Board index » delphi » ???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."

???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."

I receive the following error message in a console application when trying
to open a TQuery component connected to a TDatabase with an ODBC driver
pointed to a remote database:

"General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase]Dynamic
SQL Error."

My SQL property for the TQuery component is:

D3.CALSOSIDNUMBER, D0.DATEMADE, D2.BORROWERNAME,
D0.AMOUNT, D0.INDEXP, D0.SUPPORTOROPPOSE, (SELECT SUM(AMOUNT)
FROM INDEXPENDITURE D1 WHERE
(D1.DATEMADE <= D0.DATEMADE) AND (D1.DATEMADE >= "1/1/97") AND
(D1.DATEMADE <= "12/31/97") AND (D1.FROMFUNDS = "Campaign") AND
(D1.BORROWERID = D0.BORROWERID)) AS CUMULATIVE_TOTAL FROM
INDEXPENDITURE D0, BORROWER D2, ACCOUNT D3  WHERE
(D2.BORROWERID = D0.BORROWERID) AND (D0.DATEMADE >= "1/1/97")
AND (D0.DATEMADE <= "12/31/97") AND
(D0.FROMFUNDS = "Campaign") AND
(D3.ACCOUNTIDNUMBER = D0.ACCOUNTIDNUMBER)
ORDER BY D0.DATEMADE, D2.BORROWERNAME;

{ Yes, I know my SQL authoring leaves something to be desired... }

My ODBC Driver and TDatabase are working and connected properly.  Presently,
I am only trying to open the TQuery, then close it.

Why do I receive this error message for a static SQL statement?

TIA,

David Montgomery
montgom...@directfile.com

 

Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


David Montgomery <montgom...@ihatespam.directfile.com> wrote in article
<64fl29$s...@forums.borland.com>...

Quote
> I receive the following error message in a console application when
trying
> to open a TQuery component connected to a TDatabase with an ODBC driver
> pointed to a remote database:

> "General SQL error. [Visigenic][ODBC InterBase 4.1

Driver][InterBase]Dynamic

Quote
> SQL Error."

What is your setup?  I have found a bug (See "I Broke Interbase..."), that
resulted in this message continuously...

Connie

Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


Quote
In article <64fl29$s...@forums.borland.com>, David Montgomery wrote:
> My SQL property for the TQuery component is:

> D3.CALSOSIDNUMBER, D0.DATEMADE, D2.BORROWERNAME,
> D0.AMOUNT, D0.INDEXP, D0.SUPPORTOROPPOSE, (SELECT SUM(AMOUNT)

There's no SELECT as the front of this.   Unless you've made a typo
transcribing the SQL to your message, it's not a legal statement, so
the error is correct.  

I suggest you use the Interactive SQL utility to debug the SQL code,
then paste it into the Delpi program.

Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


Have you tried to use the native driver instead of the OBDC driver.. I've had a
few strange error messages using the OBDC driver and after using the native
driver they go
away..

Blake Courtney
bl...@ogdencheck.net

Quote
David Montgomery wrote:
> I receive the following error message in a console application when trying
> to open a TQuery component connected to a TDatabase with an ODBC driver
> pointed to a remote database:

> "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase]Dynamic
> SQL Error."

> My SQL property for the TQuery component is:

> D3.CALSOSIDNUMBER, D0.DATEMADE, D2.BORROWERNAME,
> D0.AMOUNT, D0.INDEXP, D0.SUPPORTOROPPOSE, (SELECT SUM(AMOUNT)
> FROM INDEXPENDITURE D1 WHERE
> (D1.DATEMADE <= D0.DATEMADE) AND (D1.DATEMADE >= "1/1/97") AND
> (D1.DATEMADE <= "12/31/97") AND (D1.FROMFUNDS = "Campaign") AND
> (D1.BORROWERID = D0.BORROWERID)) AS CUMULATIVE_TOTAL FROM
> INDEXPENDITURE D0, BORROWER D2, ACCOUNT D3  WHERE
> (D2.BORROWERID = D0.BORROWERID) AND (D0.DATEMADE >= "1/1/97")
> AND (D0.DATEMADE <= "12/31/97") AND
> (D0.FROMFUNDS = "Campaign") AND
> (D3.ACCOUNTIDNUMBER = D0.ACCOUNTIDNUMBER)
> ORDER BY D0.DATEMADE, D2.BORROWERNAME;

> { Yes, I know my SQL authoring leaves something to be desired... }

> My ODBC Driver and TDatabase are working and connected properly.  Presently,
> I am only trying to open the TQuery, then close it.

> Why do I receive this error message for a static SQL statement?

> TIA,

> David Montgomery
> montgom...@directfile.com

Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


Yes, this is a typo.  No, it is not causing my error.

Thanks,

David Montgomery
montgom...@directfile.com

Quote
Scott Samet [TeamB] wrote in message ...
>In article <64fl29$s...@forums.borland.com>, David Montgomery wrote:
>> My SQL property for the TQuery component is:

>> D3.CALSOSIDNUMBER, D0.DATEMADE, D2.BORROWERNAME,
>> D0.AMOUNT, D0.INDEXP, D0.SUPPORTOROPPOSE, (SELECT SUM(AMOUNT)

>There's no SELECT as the front of this.   Unless you've made a typo
>transcribing the SQL to your message, it's not a legal statement, so
>the error is correct.

>I suggest you use the Interactive SQL utility to debug the SQL code,
>then paste it into the Delpi program.

Re:???: "General SQL error. [Visigenic][ODBC InterBase 4.1 Driver][InterBase] Dynamic SQL Error."


I am developing a CGI app using IIS 3.0 as my web server.  I have only been
successful connecting to my databases through either ODBC or Jason Wharton's
IBObjects.

I prefer IB Objects for their speed, but I need OBDC to preserve backward
compatability with some reporting tools which require TTable and TQuery
components.

Thanks,

David Montgomery
montgom...@directfile.com

Quote
Blake Courtney wrote in message <346BEE23.B204...@ogdencheck.net>...
>Have you tried to use the native driver instead of the OBDC driver.. I've
had a
>few strange error messages using the OBDC driver and after using the native
>driver they go
>away..

>Blake Courtney
>bl...@ogdencheck.net

>David Montgomery wrote:

>> I receive the following error message in a console application when
trying
>> to open a TQuery component connected to a TDatabase with an ODBC driver
>> pointed to a remote database:

>> "General SQL error. [Visigenic][ODBC InterBase 4.1

Driver][InterBase]Dynamic

- Show quoted text -

Quote
>> SQL Error."

>> My SQL property for the TQuery component is:

>> D3.CALSOSIDNUMBER, D0.DATEMADE, D2.BORROWERNAME,
>> D0.AMOUNT, D0.INDEXP, D0.SUPPORTOROPPOSE, (SELECT SUM(AMOUNT)
>> FROM INDEXPENDITURE D1 WHERE
>> (D1.DATEMADE <= D0.DATEMADE) AND (D1.DATEMADE >= "1/1/97") AND
>> (D1.DATEMADE <= "12/31/97") AND (D1.FROMFUNDS = "Campaign") AND
>> (D1.BORROWERID = D0.BORROWERID)) AS CUMULATIVE_TOTAL FROM
>> INDEXPENDITURE D0, BORROWER D2, ACCOUNT D3  WHERE
>> (D2.BORROWERID = D0.BORROWERID) AND (D0.DATEMADE >= "1/1/97")
>> AND (D0.DATEMADE <= "12/31/97") AND
>> (D0.FROMFUNDS = "Campaign") AND
>> (D3.ACCOUNTIDNUMBER = D0.ACCOUNTIDNUMBER)
>> ORDER BY D0.DATEMADE, D2.BORROWERNAME;

Other Threads