data type conversion problem when importing Access tables to SQL Server

data type conversion problem when importing Access tables to SQL Server

Post by will » Wed, 13 Mar 2002 01:55:17



Hi,
When I import tables from Access to SQL Server via ODBC, the orginal
"text" data-type of Access table was changed to "nvarchar" data-type
in SQL Server. Anyone know how to fix this problem?
Thanks
Willie
 
 
 

data type conversion problem when importing Access tables to SQL Server

Post by Sue Hoegemeie » Wed, 13 Mar 2002 13:40:47


Just for clarification, a text data type in Access is
equivalent to a nvarchar or varchar in SQL Server. It's not
the same as a text data type in SQL Server.
But...if you need to change this from nvarchar to varchar
you can control the destination data type but I don't know
what exactly you are using to import the data so can't
really suggest anything.

--Sue



Quote:>Hi,
>When I import tables from Access to SQL Server via ODBC, the orginal
>"text" data-type of Access table was changed to "nvarchar" data-type
>in SQL Server. Anyone know how to fix this problem?
>Thanks
>Willie


 
 
 

1. conversion of ODBC SQL data types to ODBC C data types

Hi,

I have written an extended stored procedure dll for SQL server 6.5 which
I use to run select statements on an Oracle Database using a system DSN.

I use the following functions:

SQLColAttribute(hstmt, i, SQL_DESC_CONCISE_TYPE,  NULL, 0, NULL,
(SQLPOINTER) &SQLType);

- returns the ODBC SQL type in variable SQLType (e.g. SQL_VARCHAR)

SQLBindCol(hstmt, i, SQLType, data[i], ColLen[i], &ColLenT[i]);

- needs the ODBC C data type in SQLType (e.g. SQL_C_CHAR);

how can I convert the ODBC SQL data type to an ODBC C data type ?

Besides that, the extended stored procedure will return the data in a result
set
which I use the following function:

srv_describe(srvproc, i, &ColName[i], SRV_NULLTERM, SQLType[i], (DBINT)
ColLen[i], SQLType[i], (DBINT) ColLen[i], (BYTE *) NULL);

How can I convert the ODBC SQL data type or ODBC C data type to ODS data
type (e.g. SRVCHAR) ?

thanks in advance

Robbert Veldhuijsen

2. SQL Server 6.5 Service Pack 5a

3. Data Transfer from Long data type to SQL Server Text data type column

4. ODBC Oracle Query Failure From Access

5. Data Type Problem accessing Btrieve (MBF) data type

6. least expensive vendor for OI II ?

7. Disallowed implicit conversion from data type nvarchar to data type money

8. A database product like this

9. Data type conversion error when saving numeric data types

10. DTS Problem/ Import table from Access to SQL Server

11. Data conversion problems handling DB2 Decimal data types

12. Import Julian dates into SQL Server 7 Column datetime data type

13. Mapping SQL Server Data Types and ADO Data Type Enums