You are not logged in.
Pages: 1
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
with TSynDBDataSet.Create(Self) do
begin
Connection := fProps; // connect sql server2008
CommandText := 'Select * From LogInfo'; // LogInfo has more then 100000 rows.
IgnoreColumnDataSize := true;
Open; // raise error: insufficient memory for this operation.
end;
end;
But i use TADOQuery or TFDQuery. It's OK.For example:
procedure TForm1.Button1Click(Sender: TObject);
begin
with TADOQuery.Create(Self) do
begin
Connection := fADOCon;
SQL.Text := 'Select * From LogInfo';
Open; // It's OK
end;
end;
Who can help me?
I use TSQLDBWinHTTPConnectionProperties to access remotely DB. Connection success.
But sometimes the network is disconnected.For a while,network is connected.
How reconnect to remotely DB?
I am bad english. Sorry
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
with TSynDBDataSet.Create(Self) do
begin
Connection := fProps; // connect sql server2008
CommandText := 'Select CardID,CardName,CreDate From Card'; // datatype: CardID int, CardName nvarchar(50), CreDate datetime
IgnoreColumnDataSize := true;
Open;
First;
while not Eof do
begin
Memo1.Lines.Add(FieldByName('CardID').AsString);
Memo1.Lines.Add(FieldByName('CardName').AsString);
Memo1.Lines.Add(FieldByName('CreDate').AsString); // raise error: '0.41841' is a not valid timestamp
Next;
end;
end;
end;
Thank you for your help!
I didn't install Oracle client. I can run now.
But several conditions must be met:
1 Executable file must be 32 bits.
2 In the directory with the executable,must contain four files :oci.dll,oraociei12.dll,oraons.dll,msvcr100.dll.
procedure TForm1.btn1Click(Sender: TObject);
var
Lv_Rows : ISQLDBRows;
begin
Lv_Rows := fProps.Execute('select * from dual',[],nil); //here has error. Error message is "TSQLDBOracleLib error:"
while Lv_Rows.Step do
mmo1.Lines.Add(ColumnString(0));
end;
initialization
fProps := TSQLDBOracleConnectionProperties.Create('//192.168.1.221:1521/mes','','userid','pwd');
finalization
fProps.free;
OCI.dll is in the same directory with the application.
For example
fServer.LogStart('c:\log',hltW3C,'',hlrDaily,0,[hlfData..hlfSubStatus],[hlfLocalTimeRollover,hlfUseUTF8Conversion]);
In the log file,time is not local time.
This type declared in SynCommons and SynCrtSock.But they are not incompatible.
For example
Uses SynCrtSock, SynCommons ;
function XX(Arows : ISQLDBRows) : RawUTF8;
var
Lv_Pint : PPtrInt;//error
Lv_Pint : SynCommons.PPtrInt;//ok
begin
result := Arows.FetchAllAsJson(True,Lv_Pint,True);
.....
end;
Pages: 1