Newbie question...

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
StefanA
Posts: 3
Joined: Tue 10 Aug 2010 15:09

Newbie question...

Post by StefanA » Tue 10 Aug 2010 15:30

I have Dephi 2010 pro and bought the Sql server package since it's not in that version of Delphi.. I run XP SP3 and SQLExpess 2008..
With ADO there's no problem accessing tables in databases on the server, with dbExpress driver I get:

Unable to cast object of type 'Devart.DbxSda.DriverLoader.TCRDynaLinkDriverLoader' to type 'Borland.Data.TDBXDriverLoader'

Even when trying to access the demo databases provided...

I know, I'm missing something obvious... bare with me.. :roll:

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 12 Aug 2010 07:46

Please specify if you are using the SDAC components or DbxSda (dbExpress driver for SQL Server).
If you are using DbxSda try to use Query Demo and check if the problem persists.

StefanA
Posts: 3
Joined: Tue 10 Aug 2010 15:09

Post by StefanA » Thu 12 Aug 2010 15:37

Thank's for the reply!

I bought and installed the DbxSda for SQL Server, sorry I missed to mention that. I have recomplied the suggested libs mentioned in the readme file, but noticed when compiling the Query example the warning 'Unit DBExpress is deprecated'... wonder what I missed?

I run the example but get errors that the database don't exists or can't be opened...

If I try to look at the tables in Data Explorer I get the error mentioned above...

The server is local on the development machine if that has anything to do with it?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 13 Aug 2010 11:17

In the Query demo of DbxSda the standard Northwind database is used. To change this database set an appropriate parameter for TSQLConnection, like this:

Code: Select all

  SQLConnection.Params.Values['DataBase'] := 'DataBaseName';
Also to solve the problem delete the declaration of the DBExpress unit from the uses clause of the Main.pas file.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 13 Aug 2010 11:18

Note: DbxSda does not support Data Explorer of RAD Studio 2010 because Data Explorer is a .NET application, and DbxSda does not support .NET under RAD Studio 2010.

StefanA
Posts: 3
Joined: Tue 10 Aug 2010 15:09

Post by StefanA » Sat 14 Aug 2010 14:47

Thank's!!!

You pinpointed the problem, many thank's!!
Now I have tested the Query example on my own database and tables, works great!

Didn't know that Data Explorer was a .NET version, good to get that clearified!

I'm happy, case closed! :D

Post Reply