tadoquery

Using ParseSQL Command for ADO Parameters Cause Invalid Parameter DataType

自作多情 提交于 2019-12-04 17:33:12
I have some SQL Command that contains a parameter such:(Note that myID has "int" type in SQL) vSqlString :='Select * From myTable Where myID= :paramID'; and Use ParseSQL Command to execute this command: myADOQuery.Parameters.ParseSQL(vSqlString , True); Now myADOQuery.Parameters.ParamByName('paramID').DataType is smallint Type and it can't accept negative integer values. I can exactly show to compiler that my Parameter[0].DataType is ftIneteger and it works properly, but what is a good solution for this problem? Mohammad Gohari My question is asked by Mr. imanShadabi Here: Using TAdoQuery

ADO components CommandTimeout

荒凉一梦 提交于 2019-12-01 04:11:02
I have a problem with settings of the query execution timeout with TADOQuery, TADOCommand or TADODataSet (I've tried it with each one). I have a tiny application, which connects to the database and periodically executes stored procedures, which returns dataset as a result . My aim is to keep this application always online, but my problem is that when the connection is lost, the timeout of just executed command (through the one of the mentioned components) takes the default 30 seconds. I've been looking for the solution, but nothing works. Could you give me an advice, how to set the

ADO components CommandTimeout

笑着哭i 提交于 2019-12-01 01:20:08
问题 I have a problem with settings of the query execution timeout with TADOQuery, TADOCommand or TADODataSet (I've tried it with each one). I have a tiny application, which connects to the database and periodically executes stored procedures, which returns dataset as a result . My aim is to keep this application always online, but my problem is that when the connection is lost, the timeout of just executed command (through the one of the mentioned components) takes the default 30 seconds. I've

How to achieve independent cloned TADODataSet?

二次信任 提交于 2019-11-30 23:03:24
The scenarios is like this: We have some SQL table. We are performing an SQL query on this table and we have results in TADOQuery object. var qryOryginal, qryClone: TADOQuery; begin //setup all the things here qryOryginal.Active := True; qryClone.Clone(qryOryginal, ltBatchOptimistic); qryOryginal.Delete; //delete in qryOryginal casues that qryClone deletes its record too! end; So, after cloning the DataSet my qryClone should hold and independent data(at least I thought so). However, performing Delete on qryOryginal causes the same operation on the qryClone. I don't want that. Any ideas? I know

How to achieve independent cloned TADODataSet?

大兔子大兔子 提交于 2019-11-30 17:32:26
问题 The scenarios is like this: We have some SQL table. We are performing an SQL query on this table and we have results in TADOQuery object. var qryOryginal, qryClone: TADOQuery; begin //setup all the things here qryOryginal.Active := True; qryClone.Clone(qryOryginal, ltBatchOptimistic); qryOryginal.Delete; //delete in qryOryginal casues that qryClone deletes its record too! end; So, after cloning the DataSet my qryClone should hold and independent data(at least I thought so). However,

Handling of Unicode Characters using Delphi 6

倾然丶 夕夏残阳落幕 提交于 2019-11-30 17:06:59
问题 I have a polling application developed in Delphi 6. It reads a file, parse the file according to specification, performs validation and uploads into database ( SQL Server 2008 Express Edition ) We had to provide support for Operating Systems having Double Byte Character Sets (DBCS) e.g. Japanese OS. So, we changed the database fields in SQL Server from varchar to nvarchar. Polling works fine in Operating Systems with DBCS. It also works successfully for non-DBCS Operating systems, if the

How to pass parameters to an ADOQuery object?

喜夏-厌秋 提交于 2019-11-28 08:14:40
问题 I am using ADOQuery in Delphi 7 and Oracle. I am getting error while passing parameters to ADOQuery. I have used following line. Please help me to identify error. ADOQuery.Sql.text:= 'select * from temp_table '+ 'where column1 in (select column from table2 where id=:id) and id=:id'; ADOQuery.Parameters.ParamByValue('id').value= 'abc'; ADOQuery.open; when I open the query i will get following error: Parameter object is improperly defined. Inconsistent or incomplete information is provided. 回答1