| View previous topic :: View next topic |
| Author |
Message |
BStamps Guest
|
Posted: Mon Mar 28, 2005 9:36 pm Post subject: Syntax error or access violation - TSQLQuery |
|
|
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
|
Posted: Tue Mar 29, 2005 12:30 am Post subject: Re: Syntax error or access violation - TSQLQuery |
|
|
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
|
Posted: Tue Mar 29, 2005 2:01 pm Post subject: Re: Syntax error or access violation - TSQLQuery |
|
|
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 |
|
 |
|