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.OleDbPara meter, Dim paramCustomer As New
OleDb.OleDbPara meter
[snip]
paramDate.Param eterName = "@InvDate"
paramDate.Value = invDate
paramDate.OleDb Type = OleDb.OleDbType .Date
cmdSQL.Paramete rs.Add(paramDat e)
paramCustomer.P arameterName = "@code"
paramCustomer.V alue = cust
cmdSQL.Paramete rs.Add(paramCus tomer)
myOleDbDataAdap ter.Fill(DTResu lt) ******* exception thrown - "Error
converting data type nvarchar to datetime"
....
Stored proc being called is:
CREATE PROCEDURE dbo.bo_GetDisti nctOrders (@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.OleDbPara meter, Dim paramCustomer As New
OleDb.OleDbPara meter
[snip]
paramDate.Param eterName = "@InvDate"
paramDate.Value = invDate
paramDate.OleDb Type = OleDb.OleDbType .Date
cmdSQL.Paramete rs.Add(paramDat e)
paramCustomer.P arameterName = "@code"
paramCustomer.V alue = cust
cmdSQL.Paramete rs.Add(paramCus tomer)
myOleDbDataAdap ter.Fill(DTResu lt) ******* exception thrown - "Error
converting data type nvarchar to datetime"
....
Stored proc being called is:
CREATE PROCEDURE dbo.bo_GetDisti nctOrders (@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:-)
Comment