hi all,
i have a VB program that uses a sql server database.
i put a sample of my code :
strSQL = "SELECT ContactLName, ContactAddress, ContactPhWork, ContactMobile, ContactFax, ContactEmail FROM T_CONTACTS WHERE ContactID = 15;"
Set rsTemp = New ADODB.Recordset
rsTemp.Open strSQL, MyConn, adOpenStatic
then i get back the results of my query with this :
CStr(rsTemp.Fields("ContactAddress"
CStr(rsTemp.Fields("ContactMobile" ...
for each field.
i take them to put them in a web page.
what i need to know is the size of each field, as described in the database.
an exemple :
in the database the size of the field ContactAddress is 200.
so the text box should get 200 characters max too. and if someone changes the size of the field in the database, that should be automaticaly changed in the code. that's why i'd like to know how to get the lenght of a field, is there a varialbe, a property, something that returns the max lenght of each field ???.
any idea ??? X-)
best regards,
elise Best regards,
Elise
i have a VB program that uses a sql server database.
i put a sample of my code :
strSQL = "SELECT ContactLName, ContactAddress, ContactPhWork, ContactMobile, ContactFax, ContactEmail FROM T_CONTACTS WHERE ContactID = 15;"
Set rsTemp = New ADODB.Recordset
rsTemp.Open strSQL, MyConn, adOpenStatic
then i get back the results of my query with this :
CStr(rsTemp.Fields("ContactAddress"
CStr(rsTemp.Fields("ContactMobile" ...
for each field.
i take them to put them in a web page.
what i need to know is the size of each field, as described in the database.
an exemple :
in the database the size of the field ContactAddress is 200.
so the text box should get 200 characters max too. and if someone changes the size of the field in the database, that should be automaticaly changed in the code. that's why i'd like to know how to get the lenght of a field, is there a varialbe, a property, something that returns the max lenght of each field ???.
any idea ??? X-)
best regards,
elise Best regards,
Elise