I'm very new too SQL server, having recently moved up from Access. The majority of my transition has gone smoothly, but I am having one issue that I am not quite sure how too handle.
Set rst = dbs.OpenRecordset("SELECT *, instr([status],'Deleted') as s_del, instr([status],'Cancelled') as s_can FROM Workorders WHERE EntryDate > #" & DateAdd("m", -6, Date) & "# AND InstallDate = null OR InstallDate > #" & DateAdd("d", -30, Date) & "#"
This connection string is causing me problems, and I'm assuming it has too do with the SQL server backend (since it worked fine before the change). I think those functions used in the statement are geared toward the Jet DB engine and that's why I'm having problems.
Anyway, I'm looking for the translation of this statement into something that will work with SQL Server. Eventually I would like too move some queries like this one over too stored procedures, but I am still shaky on the data interchange between the VB code and the procedure...so for now I'm hoping too be able too stick with this. Any help or thoughts are appreciated.
Set rst = dbs.OpenRecordset("SELECT *, instr([status],'Deleted') as s_del, instr([status],'Cancelled') as s_can FROM Workorders WHERE EntryDate > #" & DateAdd("m", -6, Date) & "# AND InstallDate = null OR InstallDate > #" & DateAdd("d", -30, Date) & "#"
This connection string is causing me problems, and I'm assuming it has too do with the SQL server backend (since it worked fine before the change). I think those functions used in the statement are geared toward the Jet DB engine and that's why I'm having problems.
Anyway, I'm looking for the translation of this statement into something that will work with SQL Server. Eventually I would like too move some queries like this one over too stored procedures, but I am still shaky on the data interchange between the VB code and the procedure...so for now I'm hoping too be able too stick with this. Any help or thoughts are appreciated.