both use their libraries to connect
oracle - sqlserver , stringfield and widestringfield
oracle - sqlserver , stringfield and widestringfield
D2009 working with SqlServer and Oracle database I have in my application persistent fields of type string, if I connect to oracle fields recognized as twidestringfield, as I can do for you Acknowledge as Stringfield
both use their libraries to connect
both use their libraries to connect
Hello,
This sample shows how to set the UseUnicode property:
This sample shows how to set the UseUnicode property:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
SQLConnection: TSQLConnection;
SimpleDataSet: TSimpleDataSet;
i: integer;
begin
SQLConnection := TSQLConnection.Create(nil);
SQLConnection.DriverName :='DevartOracle';
SQLConnection.ConnectionName :='Devart Oracle';
SQLConnection.GetDriverFunc := 'getSQLDriverORA';
SQLConnection.LibraryName := 'dbexpoda40.dll';
SQLConnection.LoginPrompt := False;
SQLConnection.Params.Values['Database'] := 'ORCL1020';
SQLConnection.Params.Values['User_Name'] := 'scott';
SQLConnection.Params.Values['Password'] := 'tiger';
SQLConnection.Params.Values['UseUnicode'] := 'False';
SQLConnection.Connected := true;
SQLConnection.ExecuteDirect('CREATE TABLE TESTSTRING (TEXT VARCHAR2(50))');
SimpleDataSet:= TSimpleDataSet.Create(nil);
SimpleDataSet.Connection :=SQLConnection;
SimpleDataSet.DataSet.CommandText := 'SELECT * FROM TESTSTRING';
SimpleDataSet.Active := true;
for i := 0 to SimpleDataSet.Fields.Count - 1 do
case SimpleDataSet.Fields.DataType of
ftString: ShowMessage('ftString');
ftWideString:ShowMessage('ftString');
end;
end;