 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ashok Guest
|
Posted: Thu Sep 18, 2003 7:01 pm Post subject: "Object was open" error with TADOQuery |
|
|
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add(SQLStmt);
ADOQuery1.ExecSQL;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT TABLE_NAME FROM ALL_TABLES where TABLE_NAME =');
ADOQuery1.SQL.Add(QuotedStr(TheTableName));
ADOQuery1.Open;
I am sometimes getting "Object was Open" error on the last line >>
(ADOQuery1.Open;).
I am using Oracle 8i database.
ADOQuery1.CursorLocation := clUseServer
and
ADOQuery1.CursorType := ctKeyset
is set in Object Inspector
In above code, I am using CREATE TABLE customer
in ADOQuery1.ExecSQL
then
using ADOQuery1
I want to find out if customer TABLE was created successfully
where I set TheTableName = 'customer'
but ADOQuery1.Open sometime gives "Object was open" error.
How do I fix this ?
By the way the customer TABLE does not have any indexes.
Thanks,
Ashok
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Fri Sep 19, 2003 8:06 am Post subject: Re: "Object was open" error with TADOQuery |
|
|
It is DB_E_OBJECTOPEN error:
The provider would have to open a new connection to support the operation,
and DBPROP_MULTIPLECONNECTIONS is set to VARIANT_FALSE. Any streams used to
pass input parameters are not released.
DBPROP_MULTIPLECONNECTIONS is "Multiple Connections" property on
TADOConnection.
//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Ashok" <ashok (AT) ureach (DOT) com> сообщил/сообщила в новостях следующее:
news:3f6a0102$1 (AT) newsgroups (DOT) borland.com...
| Quote: | ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add(SQLStmt);
ADOQuery1.ExecSQL;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT TABLE_NAME FROM ALL_TABLES where TABLE_NAME
=');
ADOQuery1.SQL.Add(QuotedStr(TheTableName));
ADOQuery1.Open;
I am sometimes getting "Object was Open" error on the last line
(ADOQuery1.Open;).
I am using Oracle 8i database.
ADOQuery1.CursorLocation := clUseServer
and
ADOQuery1.CursorType := ctKeyset
is set in Object Inspector
In above code, I am using CREATE TABLE customer
in ADOQuery1.ExecSQL
then
using ADOQuery1
I want to find out if customer TABLE was created successfully
where I set TheTableName = 'customer'
but ADOQuery1.Open sometime gives "Object was open" error.
How do I fix this ?
By the way the customer TABLE does not have any indexes.
Thanks,
Ashok
|
|
|
| Back to top |
|
 |
Ashok Guest
|
Posted: Fri Sep 19, 2003 4:31 pm Post subject: Re: "Object was open" error with TADOQuery |
|
|
Viatcheslav,
I have this problem when I use one TADOConnection
and use some SELECT statements, then CREATE TABLE sql statement.
Then to confirm DBPROP_MULTIPLECONNECTIONS situation,
I created 2nd TADOConnection for exclusive use to send sql "CREATE TABLE"
and "Opject was oper" error did not occur.
How can I use just one TADOConnection and set DBPROP_MULTIPLECONNECTIONS
to appropriate value ?
Thanks,
Ashok
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote
| Quote: | It is DB_E_OBJECTOPEN error:
The provider would have to open a new connection to support the operation,
and DBPROP_MULTIPLECONNECTIONS is set to VARIANT_FALSE. Any streams used
to
pass input parameters are not released.
DBPROP_MULTIPLECONNECTIONS is "Multiple Connections" property on
TADOConnection.
//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Ashok" <ashok (AT) ureach (DOT) com> сообщил/сообщила в новостях следующее:
news:3f6a0102$1 (AT) newsgroups (DOT) borland.com...
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add(SQLStmt);
ADOQuery1.ExecSQL;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT TABLE_NAME FROM ALL_TABLES where TABLE_NAME
=');
ADOQuery1.SQL.Add(QuotedStr(TheTableName));
ADOQuery1.Open;
I am sometimes getting "Object was Open" error on the last line
(ADOQuery1.Open;).
I am using Oracle 8i database.
ADOQuery1.CursorLocation := clUseServer
and
ADOQuery1.CursorType := ctKeyset
is set in Object Inspector
In above code, I am using CREATE TABLE customer
in ADOQuery1.ExecSQL
then
using ADOQuery1
I want to find out if customer TABLE was created successfully
where I set TheTableName = 'customer'
but ADOQuery1.Open sometime gives "Object was open" error.
How do I fix this ?
By the way the customer TABLE does not have any indexes.
Thanks,
Ashok
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Sat Sep 20, 2003 6:26 am Post subject: Re: "Object was open" error with TADOQuery |
|
|
ADOConnection1.Properties['Multiple Connections'].Value := True.
However True is default for this property and some OLEDB providers may not
support this property.
//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Ashok" <ashok (AT) ureach (DOT) com> сообщил/сообщила в новостях следующее:
news:3f6b2f4c (AT) newsgroups (DOT) borland.com...
| Quote: | Viatcheslav,
I have this problem when I use one TADOConnection
and use some SELECT statements, then CREATE TABLE sql statement.
Then to confirm DBPROP_MULTIPLECONNECTIONS situation,
I created 2nd TADOConnection for exclusive use to send sql "CREATE TABLE"
and "Opject was oper" error did not occur.
How can I use just one TADOConnection and set DBPROP_MULTIPLECONNECTIONS
to appropriate value ?
Thanks,
Ashok
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:3f6abaef$1 (AT) newsgroups (DOT) borland.com...
It is DB_E_OBJECTOPEN error:
The provider would have to open a new connection to support the
operation,
and DBPROP_MULTIPLECONNECTIONS is set to VARIANT_FALSE. Any streams used
to
pass input parameters are not released.
DBPROP_MULTIPLECONNECTIONS is "Multiple Connections" property on
TADOConnection.
//----------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Ashok" <ashok (AT) ureach (DOT) com> сообщил/сообщила в новостях следующее:
news:3f6a0102$1 (AT) newsgroups (DOT) borland.com...
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add(SQLStmt);
ADOQuery1.ExecSQL;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT TABLE_NAME FROM ALL_TABLES where
TABLE_NAME
=');
ADOQuery1.SQL.Add(QuotedStr(TheTableName));
ADOQuery1.Open;
I am sometimes getting "Object was Open" error on the last line
(ADOQuery1.Open;).
I am using Oracle 8i database.
ADOQuery1.CursorLocation := clUseServer
and
ADOQuery1.CursorType := ctKeyset
is set in Object Inspector
In above code, I am using CREATE TABLE customer
in ADOQuery1.ExecSQL
then
using ADOQuery1
I want to find out if customer TABLE was created successfully
where I set TheTableName = 'customer'
but ADOQuery1.Open sometime gives "Object was open" error.
How do I fix this ?
By the way the customer TABLE does not have any indexes.
Thanks,
Ashok
|
|
|
| Back to top |
|
 |
|
|
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
|
|