A
Andrew Baker
this seems to be an SQL Server error but I cant work out how it is occuring.
Itr is also after 3am and I cant keep working but need to demo by tomorrow.
TIA. The code is:
Private Sub myMethod(ByVal cust As String, ByVal invDate As Date)
[snip]
Dim paramDate As New OleDb.OleDbParameter, Dim paramCustomer As New
OleDb.OleDbParameter
[snip]
paramDate.ParameterName = "@InvDate"
paramDate.Value = invDate
paramDate.OleDbType = OleDb.OleDbType.Date
cmdSQL.Parameters.Add(paramDate)
paramCustomer.ParameterName = "@code"
paramCustomer.Value = cust
cmdSQL.Parameters.Add(paramCustomer)
myOleDbDataAdapter.Fill(DTResult) ******* exception thrown - "Error
converting data type nvarchar to datetime"
....
Stored proc being called is:
CREATE PROCEDURE dbo.bo_GetDistinctOrders (@code as nvarchar(8), @invdate as
datetime) AS
SELECT prodcode, qty, price, comment
FROM Orders
where custcode = @code and InvDate = @InvDate
GO (Note, InvDate in the Orders table is a datetime
Itr is also after 3am and I cant keep working but need to demo by tomorrow.
TIA. The code is:
Private Sub myMethod(ByVal cust As String, ByVal invDate As Date)
[snip]
Dim paramDate As New OleDb.OleDbParameter, Dim paramCustomer As New
OleDb.OleDbParameter
[snip]
paramDate.ParameterName = "@InvDate"
paramDate.Value = invDate
paramDate.OleDbType = OleDb.OleDbType.Date
cmdSQL.Parameters.Add(paramDate)
paramCustomer.ParameterName = "@code"
paramCustomer.Value = cust
cmdSQL.Parameters.Add(paramCustomer)
myOleDbDataAdapter.Fill(DTResult) ******* exception thrown - "Error
converting data type nvarchar to datetime"
....
Stored proc being called is:
CREATE PROCEDURE dbo.bo_GetDistinctOrders (@code as nvarchar(8), @invdate as
datetime) AS
SELECT prodcode, qty, price, comment
FROM Orders
where custcode = @code and InvDate = @InvDate
GO (Note, InvDate in the Orders table is a datetime
