BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syntax error or access violation - TSQLQuery

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
BStamps
Guest





PostPosted: Mon Mar 28, 2005 9:36 pm    Post subject: Syntax error or access violation - TSQLQuery Reply with quote




Using Delphi 2005 - Win 2000
I cannot seem to get the TParams to work using a TSQLQuery ( or a TSQLDataSet)

Drop a TSQLConnection on any from.
Connect to any database.
Drop a TSQLQuery
Set SQL to (select * from anytable where anyid = :id_any)
In the pramas editor of the TSQLQuery in the IDE.. set the properties of the param "id_any" to this:
DATATYPE = ftInteger
PARAMTYPE = ptInput
Value = 1 (or what ever id matches an id in your table)
Type = integer

Or set this up in code dynamicly .. does not mater

ether way I get "Syntax error or access violation" if I try to set the Active property to True.

So.. what is going on here?


Back to top
Ramesh Theivendran(Borlan
Guest





PostPosted: Tue Mar 29, 2005 12:30 am    Post subject: Re: Syntax error or access violation - TSQLQuery Reply with quote



I believe you are trying this with MSSQL. If that be the case you are
running into a SQLOLEDB.DLL limitation
There is a property PrepareSQL and you can set it to False to workaround it.

T.Ramesh.

"BStamps" <BStamps (AT) HarrisComputer (DOT) com> wrote

Quote:

Using Delphi 2005 - Win 2000
I cannot seem to get the TParams to work using a TSQLQuery ( or a
TSQLDataSet)

Drop a TSQLConnection on any from.
Connect to any database.
Drop a TSQLQuery
Set SQL to (select * from anytable where anyid = :id_any)
In the pramas editor of the TSQLQuery in the IDE.. set the properties of
the param "id_any" to this:
DATATYPE = ftInteger
PARAMTYPE = ptInput
Value = 1 (or what ever id matches an id in your table)
Type = integer

Or set this up in code dynamicly .. does not mater

ether way I get "Syntax error or access violation" if I try to set the
Active property to True.

So.. what is going on here?





Back to top
BStamps
Guest





PostPosted: Tue Mar 29, 2005 2:01 pm    Post subject: Re: Syntax error or access violation - TSQLQuery Reply with quote





Thanks you sir.. that seems to work.


"Ramesh Theivendran(Borland)" <Ramesh.Theivendran (AT) borland (DOT) com> wrote:
Quote:
I believe you are trying this with MSSQL. If that be the case you are
running into a SQLOLEDB.DLL limitation
There is a property PrepareSQL and you can set it to False to workaround it.

T.Ramesh.

"BStamps" <BStamps (AT) HarrisComputer (DOT) com> wrote in message
news:424878d8$1 (AT) newsgroups (DOT) borland.com...

Using Delphi 2005 - Win 2000
I cannot seem to get the TParams to work using a TSQLQuery ( or a
TSQLDataSet)

Drop a TSQLConnection on any from.
Connect to any database.
Drop a TSQLQuery
Set SQL to (select * from anytable where anyid = :id_any)
In the pramas editor of the TSQLQuery in the IDE.. set the properties of
the param "id_any" to this:
DATATYPE = ftInteger
PARAMTYPE = ptInput
Value = 1 (or what ever id matches an id in your table)
Type = integer

Or set this up in code dynamicly .. does not mater

ether way I get "Syntax error or access violation" if I try to set the
Active property to True.

So.. what is going on here?






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.