Re: Troubles with Delphi and Oracle
From: Michael Reviakin <misha_at_percombank.kiev.ua>
Date: 1995/09/13
Message-ID: <AAsakLm4J8_at_percombank.kiev.ua>#1/1
Date: 1995/09/13
Message-ID: <AAsakLm4J8_at_percombank.kiev.ua>#1/1
> From: sae_at_relay.cinvest.chel.su (Alexander E. Sautin)
> Subject: [NEWS] Troubles with Delphi and Oracle
>
> When I try to make procedure like:
> Query1.sql.clear;
> Query1.sql.add('insert into test values(:name)');
> Query1.close;
> Query1.prepare;
> Query1.Params[0].AsString:=Edit1.Text;
> Query1.execSQL;
> My APPLication interupts with message General Protection Fault im module
> SQLD_ORA.DLL at 0011:33D2
> Why?
The matter is of sequence of statements your pretty nice procedure uses. Try something like this:
Query1.Close; { disactivate query first } Query1.SQL.Clear; Query1.SQL.Add('INSERT ...'); Query1.Params[0].AsString:=Edit1.Text; { parameters assignment should be done } Query1.Prepare; { before query preparation }Query1.ExecSQL;
By the way: you should use another newsgroup regarding your Delphi problems, namely:
alt.comp.lang.borland-delphi
comp.lang.pascal.delphi
Regards,
Michael Received on Wed Sep 13 1995 - 00:00:00 CEST