Hi,
I'm designing an application using some software from a company called Citect. The software uses there own code called CiCode which is a cross between C and VBA script (I've been told).
The application I'm designing talks to a .mdb access database and I'm trying to write the function that deletes a record based on a variable called RecNo.
I have tried the following lines:
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO='RecNo'";
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO=RecNo";
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO='" + RecNo + "'";
But without success... HOWEVER if I write:
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO='3'";
It will delete Record No 3.
This tells me that the rest of my code is fine, but there is a problem with the software seeing RecNo as a number. Maybe it is literally looking for the word "RecNo" in the PROG_NO field??
Has anyone any idea's on how to write this?
Thanks in advance, I'm tearing my hair out over here and, as is usual, Citect Tech Support promised to ring me back, didn't, haven't answered the email either, and now they've closed for the weekend. Grrr!
Cheers
JT
I don't make mistakes, I'm merely beta-testing life.
I'm designing an application using some software from a company called Citect. The software uses there own code called CiCode which is a cross between C and VBA script (I've been told).
The application I'm designing talks to a .mdb access database and I'm trying to write the function that deletes a record based on a variable called RecNo.
I have tried the following lines:
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO='RecNo'";
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO=RecNo";
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO='" + RecNo + "'";
But without success... HOWEVER if I write:
sSQL = "DELETE FROM pallet_formats WHERE PROG_NO='3'";
It will delete Record No 3.
This tells me that the rest of my code is fine, but there is a problem with the software seeing RecNo as a number. Maybe it is literally looking for the word "RecNo" in the PROG_NO field??
Has anyone any idea's on how to write this?
Thanks in advance, I'm tearing my hair out over here and, as is usual, Citect Tech Support promised to ring me back, didn't, haven't answered the email either, and now they've closed for the weekend. Grrr!
Cheers
JT
I don't make mistakes, I'm merely beta-testing life.