Skip to Content
0
Former Member
Jan 23, 2013 at 02:26 PM

Passing data-parameter to stored procedure (SQL-Server)

295 Views

Hi,

I'm using MS SQL 2008R2, CR 2008 (Business One Version).

Problem: I want to use a stored procedure from SQL - Server, witch needs a parameter date or datetime (tried both).

I tried to use the SP as a command and as choose from the dbo - list. In both cases i get an error, even if I use an exec-statement without CR parameters (static), and although there are no date or datetime columns in the result set.

Error:

Failed to retrieve data from the database.... Error converting nvarchar in datetime....

Here is the exec-statement:

exec dbo.MySP '10303', {ts '2012-01-23 15:14:57'}, {ts '2013-01-23 15:14:54'} (works fine on SQL-Server!)

any idea?

Thank you for your help!

Andreas