Hi All.
I've got a VB6 program in which I use a adodb.command object to create a prepared query. This query uses parameters, i.e "where company_no=?". Later in my program I give a value to this parameter, i.e "command1.parameters(0)="1234". All of this works fine, until a pass a date as a parameter to a date field in my database. I've tried passing the date as a string, with or without quotes and in different formats (dd/mm/yyyy, mm/dd/yyyy, etc.), but I can't seem to get it to work.
Does anybody know what I'm doing wrong?
I'm using DB2, but I've found that there is little or no difference between the different databases when writing VB code, so help pertaining to any db would be appreciated.
I've got a VB6 program in which I use a adodb.command object to create a prepared query. This query uses parameters, i.e "where company_no=?". Later in my program I give a value to this parameter, i.e "command1.parameters(0)="1234". All of this works fine, until a pass a date as a parameter to a date field in my database. I've tried passing the date as a string, with or without quotes and in different formats (dd/mm/yyyy, mm/dd/yyyy, etc.), but I can't seem to get it to work.
Does anybody know what I'm doing wrong?
I'm using DB2, but I've found that there is little or no difference between the different databases when writing VB code, so help pertaining to any db would be appreciated.