Okay, this *should* be an easy question, wondering if anyone else out there
has the same problem. I'm porting a Delpi DB app from using our SQL
server at work over to PC-based MS Access 2.0. I'm having a problem using
INSERT INTO commands - SQL delete and reads work fine with the access DB.
However, when I try to do a simple INSERT INTO command, I get errors.
(I modeled this small simple application after the help file example in
Access)
procedure Tform1.cmdTestClick(Sender: Tobject);
begin
InsQuery.Close;
InsQuery.SQL.ADD('Insert into cable_table (project_name, seq)');
InsQuery.SQL.ADD('values (');
InsQuery.SQL.ADD('"tester", "44")');
end;
(the rest of the program is just the Tquery component, DBcomponent, and two
buttons. Very simple. The error I get is "MSACCESS[ODBC] driver error:
"Two parameters were expected, 0 were supplied" Blah, Blah. The TStrings
field of the Querycomponent is empty. I know the other settings are
correct, it sees the database fine. If I use the above Idea with :params
method, then it works. However, I can't use params in my application
easily (already tried) so I need to discover why this isn't working. Any
ideas? I'm leaning toward an outdated or buggy ODBC driver - Borland Tech
support didn't know what was wrong either. Anyone?
--
N. Decker