I think this is easier: SELECT RIGHT('00000000' + Ltrim(str(MyKey)), 8) From Table Ian
I
ianhoc
@ianhoc
Posts
-
Numeric Column -
SqlClient will not connect to 2005 SqlServerOleDb connects fine? VS2005; C#; SQL 2005 Developer (remote server) SqlClient connection string: "data source=MyRemoteServer;user id=MyUserID;password=MyPassword;initial catalog=DbName;workstation id=PC1" OleDb connection string: "provider=SQLxxxx;data source=MyRemoteServer;user id=MyUserID;password=MyPassword;initial catalog=DbName;workstation id=PC1" (xxxx = I forget the exact provider string) OleDb connects fine, SqlClient times out looking for the server? Am I missing something obvious? Should I really worry about this - I thought SqlClient was faster and better? Thanks Ian