![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I working on an existing app that uses DAO to connect to Access databases. I am trying to update this app to allow the use of SQL Server databases. At one point, we create a TableDef object for one of the tables, then loop through the fields, looking at the TableDef.Type with a Case statement and then acting accordingly. The problem is, the TableDef.Type for SQL Server fields is not the same as for the Access fields. So, I began debugging the code to get the values, but the problem is that the Type is inconsistent. Nvarchar fields have a TableDef.Type of 56 when running the program one time, but other times have types of 57, 62, 60, etc. Is there a reason these are not consistent? Is there a range of values that the types fall into? I'm looking for a resource that shows the TableDef.Type values for SQL Server field datatypes. Anyone know where I can find this? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
I working on an existing app that uses DAO to connect to Access databases. I am trying to update this app to allow the use of SQL Server databases. At one point, we create a TableDef object for one of the tables, then loop through the fields, looking at the TableDef.Type with a Case statement and then acting accordingly. The problem is, the TableDef.Type for SQL Server fields is not the same as for the Access fields. So, I began debugging the code to get the values, but the problem is that the Type is inconsistent. Nvarchar fields have a TableDef.Type of 56 when running the program one time, but other times have types of 57, 62, 60, etc. Is there a reason these are not consistent? Is there a range of values that the types fall into? I'm looking for a resource that shows the TableDef.Type values for SQL Server field datatypes. Anyone know where I can find this? |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |