In code Generated SQL does not compile! (help) 
Author Message
 In code Generated SQL does not compile! (help)

Hello all,

I need some expertise on this:

I generate an SQL-statement in VBA. It quite big. It involves 9
tables, of which 3 are ODBC.
Then i Create a querydef with it, and open a recordset.
It says there are no results.
the VERY strange thing is, that is if i open the querydef in the
database window and change something (i add a space and then remove
it) IT WORKS CORRECTLY (i get resultrecords)
Apparantly a flag is set that the query needs to be recompiled.

This should happen also when i open the recordset.

Why doesn't it?
What can I do about it?
Can I set the flag myself?

Thanks for thinking with me.
Frans
--
Please send useful reply's via e-mail.
When replying via e-mail, remove the letters 'NOSPAM.' from my
adress.
Thank you.



Fri, 28 Dec 2001 03:00:00 GMT  
 In code Generated SQL does not compile! (help)
On Mon, 12 Jul 1999 11:19:17 +0200, Frans Trentelman

Quote:

>I generate an SQL-statement in VBA. It quite big. It involves 9
>tables, of which 3 are ODBC.

If you are using LIKE wildcards, have you checked that the appropriate
syntax is used: Jet is typically non-standard and uses "*?", while
most (all?) RDBMSs use ANSI standard "?_".

The query designer is likely to know how to translate, VBA will
definitely not.

Tim F

--



Fri, 28 Dec 2001 03:00:00 GMT  
 In code Generated SQL does not compile! (help)

Quote:

> On Mon, 12 Jul 1999 11:19:17 +0200, Frans Trentelman

> >I generate an SQL-statement in VBA. It quite big. It involves 9
> >tables, of which 3 are ODBC.

> If you are using LIKE wildcards, have you checked that the appropriate
> syntax is used: Jet is typically non-standard and uses "*?", while
> most (all?) RDBMSs use ANSI standard "?_".

> The query designer is likely to know how to translate, VBA will
> definitely not.

This is not the case. The syntax definitely works. the query only gets
compiled by the Jet Database Engine Query optimizer if it is changed
in the designer.......(but i don't want that)

--
Please send very useful reply's via e-mail.
When replying via e-mail, remove the letters 'NOSPAM.' from my adress.
Thank you.



Sat, 29 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MCI Control Gets Into a Tizzy - Done Events Not Being Generated

2. simple animations with code...not doing what they should

3. Simple animations with code...not doing what they should

4. SQL statement not doing its job

5. Herlp: LIKE in SQL doe not work anymore

6. Just a note about debugging code generated sql statements

7. ActiveX control or Available Code to Generate SQL

8. Generate ASP, ADO and VB code from SQL Stored Procedures with TierBuilder V2.1

9. Default/Code Generated value will NOT Bind?!?!?!

10. Code not staying compiled - A97

11. Argh!!! NOT NOT NOT...Help with Access SQL

12. sdk sample code does not compile

 

 
Powered by phpBB® Forum Software