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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass in a decimal value to SQL SP

Status
Not open for further replies.

mrees

Programmer
Feb 20, 2003
197
GB
Dear all,

MS Access 2k, SQL2k

I have an access database that needs to pass values from an access table into a SQL2k table. The data is inserted into the SQL table using an ADO connection that fires a SQL SP with the data items passed as parameters.

My last couple of fields are set as decimal precision 18, scale 2 in Access, these are to go into a SQL field of decimal(18,2). When I try to run the code, it errors with an "Run-time error '3704': Operation is not allowed when the object is closed". If I change the access field type to integer, it all works fine.

How do Access and SQL treat decimals differently, is there an easy fix to my problem? (I need these to be decimal as its a monetary amount)
 
Ignore me, set my datatype to Currency, all is well with the world!

mrees
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top