Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 access to sql server field adding question marks

Author  Topic 

workindan
Starting Member

21 Posts

Posted - 2011-08-31 : 14:44:30
Access 2010, SQL Server 2008

I'm importing an excel file into access
(DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, tblname etc)

Then I load the table into a recordset, go through line by line and use ADO to "INSERT INTO" in sql server table

When the data arrives in SQL server, two of the text fields have question marks bookended on each line. What gives?

Excel: TEXTEXT (saved as .xlsx)
Access: TEXTEXT (field set to TEXT when imported)
SQL SERVER: ?TEXTTEXT? (field as nvarchar(50))

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-01 : 00:04:02
i think it might be some unprintable characters. try taking ascii values and printing out like

ASCII(LEFT(Field,1)) and ASCII(RIGHT(Field,1))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -