Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incompatible Data types form Access to SQL Server 7

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I have data being saved into a SQL server table from UPS World Ship through a DSN.
I can see the data just fine in Access. When I try to look up something using the Job number field from SQL Server I get a type mismatch in my VBA code window

The data is "nvarchar" in SQL. Can I convert it or what’s up with this. I need th edata to be variable in SQL I choose this fireld becasu the "char" data type padded the data with trailing spaces which creates other problems.

here is my VBA code:

SQLHead = "SELECT SALES_ORDER, ORDER_TYPE, CUSTOMER, CUSTOMER_PO_NUM FROM [none_SO_MASTER_HDR] WHERE SALES_ORDER = '" & ordernum & "';"
Set Head = db.OpenRecordset(SQLHead) '<<< Error here 'type mismatch'

TIA
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
I fixed it
I had another issue which was masking as that.
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top