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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Table problem

Status
Not open for further replies.

liaml1

MIS
Nov 24, 2004
63
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?
I am using Delphi and MSDE.

Liam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top