Board index » delphi » Delphi Insert Query: Oracle8i backend
Kathy Frisk
![]() Delphi Developer |
Tue, 18 May 2004 00:52:10 GMT
Delphi Insert Query: Oracle8i backend
HELP!!!
I can't get this insert statement to work(I get my err msg : Unable to open database). My select statements work and my direct inserts(using ''sara'' for myName value instead of a parameter) work and I also set the sql statement 'Delete from cstable' and it worked but I can't get this insert to work. The dbase backend is Oracle8i and the Name field is a varchar(50): it was a varchar2(50) but I changed it to see if it would work. I need new EYES(lol). Any help WOULD BE greatly appreciated! Also, how can I know which conversion function on the parameters to use betwn Oracle and Delphi...for example I have datetimepicker objects in my form that I need to send the values to an Oracle date field: Any code samples? Thanks ever so much! --------------------------------------------------------------------------- Q.DatabaseName := DB.DatabaseName; DS.DataSet := MainFormAddNewPageQuery_Initialize; Q.SQL.Clear; Q.SQL.Add('INSERT INTO CstabLE(NAME) VALUES(:myName)'); Q.ParamByName('myName').AsString := 'TestName'; ShowMessage('The param myName value is: ' + Q.Params[0].Value); Q.ExecSQL; except; --------------------------------------------------------------------------- -- |