BenSCooper
Programmer
Dear All,
I have an ADO recordset in the format (TableName, FieldName, DataType, MaxLength, DefaultValue)
I am trying to construct an ADO recordset object from this in the following format:
Name: Field1 Value: Default1
Name: Field2 Value: Default2
The purpose behind this is to get the table structure from SQL Server in recordset1 and then construct the second recordset so I can enter data into it and pass it back to my data access function without having to pass 101 parameters.
I've tried the following code:
Dim rst As New ADODB.Recordset
rst.Fields.Append "Field1", [DataType] (e.g. advarchar), [MaxLength], , [DefaultValue]
However, no matter what I seem to try I always get the error "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another" whenever I pass a default value that isn't Null.
Advice would be gratefully received as I really need the default values included in this solution.
Thanks in advance
Ben Cooper
I have an ADO recordset in the format (TableName, FieldName, DataType, MaxLength, DefaultValue)
I am trying to construct an ADO recordset object from this in the following format:
Name: Field1 Value: Default1
Name: Field2 Value: Default2
The purpose behind this is to get the table structure from SQL Server in recordset1 and then construct the second recordset so I can enter data into it and pass it back to my data access function without having to pass 101 parameters.
I've tried the following code:
Dim rst As New ADODB.Recordset
rst.Fields.Append "Field1", [DataType] (e.g. advarchar), [MaxLength], , [DefaultValue]
However, no matter what I seem to try I always get the error "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another" whenever I pass a default value that isn't Null.
Advice would be gratefully received as I really need the default values included in this solution.
Thanks in advance
Ben Cooper