KPBecker
asked on
Error: ADOTable --> "Invalid Object Name"
Hey there !
I want to use access to an MS-SQL-Server via ADOConnection -> ADOTable.
- The connection string in ADOConnection works: "Connected = true"
- The connection to ADOTable seems to work, too: In "Table name" I can see all the names and select one.
But:
- The attempt to switch "Active = true" in ADOTable results in an error: "Invalid object name <tablename>"
What's wrong ?
Thanks
KPB
I want to use access to an MS-SQL-Server via ADOConnection -> ADOTable.
- The connection string in ADOConnection works: "Connected = true"
- The connection to ADOTable seems to work, too: In "Table name" I can see all the names and select one.
But:
- The attempt to switch "Active = true" in ADOTable results in an error: "Invalid object name <tablename>"
What's wrong ?
Thanks
KPB
Try to enclose the tabel name in square brackets, i.e. [myTable name]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, I keeps strange:
- square brackets have no effect.
- Using the "OLE DB Provider for SQL Server" ('Provider=SQLOLEDB.1' in the connection-string) does not work and results in the error described above.
- Using the "OLE DB Provider for ODBC drivers" ('Provider=MSDASQL.1' in the connection-string) _works_, but it takes about 20s (!) to switch "active" from 'false' to 'true' in ADOTable. The table can be shown correctly in a DBGrid, but this is not practicable. It takes the same time again to set a second table to 'active' in another ADOTable.
May this be a hint in regard to a security issue ?
Thanks
KPB
- square brackets have no effect.
- Using the "OLE DB Provider for SQL Server" ('Provider=SQLOLEDB.1' in the connection-string) does not work and results in the error described above.
- Using the "OLE DB Provider for ODBC drivers" ('Provider=MSDASQL.1' in the connection-string) _works_, but it takes about 20s (!) to switch "active" from 'false' to 'true' in ADOTable. The table can be shown correctly in a DBGrid, but this is not practicable. It takes the same time again to set a second table to 'active' in another ADOTable.
May this be a hint in regard to a security issue ?
Thanks
KPB
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I got an email telling me that Workshop_Alex sent another comment but I cannot see it here ?
Got it lost ?
KPB
Got it lost ?
KPB
ASKER
Just now Alex's comment arrived !
KPB
KPB
ASKER
There is no difference in regard to my probem wether I take TADOTable or TADOQuery:
- Using the "OLE DB Provider for SQL Server" ('Provider=SQLOLEDB.1' in the connection-string) does not work at all and results in the error described above ("Invalid Object name <tablename>") when I try to set TADOQuery to 'active'.
When I take the same username and the same password I can get access to the SQL-Server just by changing the driver. So I am not shure that it is a security-problem. But: ...
- Using the "OLE DB Provider for ODBC drivers" ('Provider=MSDASQL.1' in the connection-string) _works_, but it takes about 20s (!) to switch "active" from 'false' to 'true' in TADOQuery or TADOTable. The table can be shown correctly in a DBGrid, but this of course is not practicable. It takes the same time again to set a second table to 'active' in another TADOTable / TADOQuery. Moreover, this seems to be independant from the size of the table.
During this time, my client pc is working very hard of its disk - I have no idea, what it is doing there.
Meanwhile I got the advice to re-install windows 2000 on the client because something with the configuration meight be confused ! I will try it on another pc first.
KPB
- Using the "OLE DB Provider for SQL Server" ('Provider=SQLOLEDB.1' in the connection-string) does not work at all and results in the error described above ("Invalid Object name <tablename>") when I try to set TADOQuery to 'active'.
When I take the same username and the same password I can get access to the SQL-Server just by changing the driver. So I am not shure that it is a security-problem. But: ...
- Using the "OLE DB Provider for ODBC drivers" ('Provider=MSDASQL.1' in the connection-string) _works_, but it takes about 20s (!) to switch "active" from 'false' to 'true' in TADOQuery or TADOTable. The table can be shown correctly in a DBGrid, but this of course is not practicable. It takes the same time again to set a second table to 'active' in another TADOTable / TADOQuery. Moreover, this seems to be independant from the size of the table.
During this time, my client pc is working very hard of its disk - I have no idea, what it is doing there.
Meanwhile I got the advice to re-install windows 2000 on the client because something with the configuration meight be confused ! I will try it on another pc first.
KPB
ASKER
Addition:
The Delphi-exe with the SQL-driver does not work on another pc (NT 4.0) either. Using the ODBC-driver here works but it is much faster and without working on the disk at such an extent. Testing the connection (TADOConnection) always gives positive results.
Any more suggestions to solve my problem and get the SQL-driver to work ?
Thanks
KPB
The Delphi-exe with the SQL-driver does not work on another pc (NT 4.0) either. Using the ODBC-driver here works but it is much faster and without working on the disk at such an extent. Testing the connection (TADOConnection) always gives positive results.
Any more suggestions to solve my problem and get the SQL-driver to work ?
Thanks
KPB
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yesterday I got the following email:
Question Error: ADOTable --> "Invalid Object Name"
Topic Delphi Programming
Comment from Imthiyaz_ph
Date 11/16/2004 02:05AM PST
Question: Where is this comment ? The same thing happend on 11/05/2004 !
KPB
Question Error: ADOTable --> "Invalid Object Name"
Topic Delphi Programming
Comment from Imthiyaz_ph
Date 11/16/2004 02:05AM PST
Question: Where is this comment ? The same thing happend on 11/05/2004 !
KPB
ASKER
Strange - now I can see Imthiyaz_ph's comment.
It looks as if I have to send a comment by myself in order to be able to see the comments added by others.
KPB
It looks as if I have to send a comment by myself in order to be able to see the comments added by others.
KPB
i have the same problem, i also tried with all users in SQL, but i still have error. Does anyone advice more?
Thanks
Thanks