Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303

    Unhappy Unanswered: ms sql server and delphi

    hi,
    how to acces ms sql server from delphi front end. Can you give a sample code.

    thanks...

  2. #2
    Join Date
    Jan 2005
    Posts
    8
    Quote Originally Posted by popskie
    hi,
    how to acces ms sql server from delphi front end. Can you give a sample code.

    thanks...
    Can you please provide the versions of SQL Server and Delphi that you are using ?

  3. #3
    Join Date
    Oct 2003
    Location
    Jordan
    Posts
    28

    Talking

    Hi

    Place an ADO Connection in your form. then



    procedure TForm1.FormCreate(Sender: TObject);
    begin

    ADOConnection1.ConnectionString := 'Provider=SQLOLEDB.1;Password=password;Persist Security Info=True;User ID=sa;Initial Catalog=DATABASE;Data Source=SERVERNAME'

    or SERVERNAME can be (local) if you're using MSDE on local pc


    to connect

    Try
    ADOConnection1.Open;
    Except
    End;
    end;
    Firas arramli
    Systems Analyst

  4. #4
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303
    hi
    I have delphi 5 professional editon and ms sql 2000 but I have no ado componet.

    Thanks for the reply but i already migrating to C#.

    popskie.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •