I have an excel worksheet that needs to upload data to a SQL Server database. I created a stored procedure, but I am having trouble choosing the correct data type for one of the parameters.
Here is the basics of the stored procedure (I could not supply all of it, as the site is thinking it is a SQL Insertion Attack):
Here is my code to use the stored procedure:
The error description I get is [Microsoft][SQL Server Native Client 10.0][SQL Server]Procedure or function 'AddCallEvaluation' expects parameter '@TotalScore', which was not supplied.
Currently, the tables have no data, so I can play around with the data types until I figure out the one that works. It does not seem to like FLOAT (and use adSingle or adDouble for the ADO type) or REAL (and use adSingle for the ADO type). I tried adding 24 for the size (so that line would read:
but that did not work). I tried a MsgBox to display the data, and it showed an integer value at the moment. It seems very likely that I just chose a datatype that is difficult to work with. Should I use precision datatypes like Decimal? I am just banging my head against the wall at the moment and was hoping for some advice.
EDIT: I am very confused now. I just changed the parameter to NVARCHAR(50) and then cast it to a REAL in the stored procedure. So, now it just needs to pass in text. It still gives the exact same error! Now, I have no clue what it is looking for.
Bookmarks