Posted: Sat Aug 30, 2008 6:13 pm Post subject: دلفی و اس کیو ال (جستجو کردن )
با سلام
یک پروزه به زبان دلفی داشتم که باید از بانک اطلاعاتی اس کیو ال استفاده کنه عمل درج و ... را نوشتم ولی نمی دونم چه دستوراتی باید در stored procedure بنویسم تا عمل [size=18]جستجو[/size] انجام بشه لطفا کمک کنید و به صورت کامل هم توضیح بدین (تو اینترنت سرچ کردم چیز جالبی بدست نیاوردم ) ( لطفا آدرس سایت ندین )
باتشکر
خوب اگه نتوني از اينترنت اين چيز ها رو پيدا كني . هميشه محتاج فروم ها مي موني و كارت لنگ مي مونه :
يه ODBC از كنترلت اضافه كن كه به Sql وصل بشه . بعد كد زير رو اضافه كن :
procedure TForm1.Button1Click(Sender: TObject);
var
RecordSet: OleVariant;
temp: string;
DSN: string;
SelectString : string;
i : integer;
begin
// ODBC dsn from ACESS database….
DSN := 'dsn=AdoTest';
// the SQL string…
SelectString := 'SELECT * FROM clientes';
// Create an empty recordset object
RecordSet := CreateOleObject('ADODB.Recordset');
// Fill the recordset
RecordSet.Open(SELECTSTRING, DSN);
// Display the data
repeat
// the client table has four fields
// this loop will put one record per line in the memo
for i:= 0 to 3 do
temp := temp + ' ' + RecordSet.Fields[i].Value;
Memo1.Lines.Add(temp);
RecordSet.MoveNext;
temp := '';
until RecordSet.EOF;
بازم سلام
راستشو بخواین من تازه کار دلفی هستم با دلفی 6 هم کار می کنم آیا این قطعه کد با دلفی 6 هم کار می کنه ؟؟؟؟؟؟؟؟؟ و اینکه خود شی recordset رو از کدوم تب دردلفی6 باید بیارم ؟؟؟؟؟؟؟؟؟ (لطفا کامل توضیح بدید) منتظرم
با تشکر
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum