Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with ADO Table

Status
Not open for further replies.

liaml1

MIS
Nov 24, 2004
63
0
0
DM
Hello All,

I am having problems with a TADOTable component. I created it dynamically and fed in the ConnectionString and TableName properties as shown below. :

MyTable.ConnectionString:='Provider=MSDASQL.1;Password=catservNDC1;Persist Security Info=True;User ID=ndc;Data Source=dsn_ndc_cat;Initial Catalog=db_ndc';

MyTAble.TableName:='tb_category';


However when I change Active to TRUE I get the following error: EVariantTypeCastError. Could not convert Variant of type NULL into type String.

I am trying to use MS OLE DB Provider for ODBC drivers to connect to an MS SQL Server DB. I tried doing the same thing at design time instead of run time and it connects fine with no errors.

Could anyone shed some light on this error for me?


Liam
 
By the way I am running DELPHI 7.0 and MS SQL 2000 (if that helps).

Liam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top