Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 715
  • Last Modified:

Connect to a remote MSSQL database using BDE

How to connect to a remote MSSQL database using BDE ?
0
root_mailbox
Asked:
root_mailbox
  • 2
2 Solutions
 
geobulCommented:
Hi,

Create a DSN entry using 'SQL Server' ODBC driver (ODBC Data Source Administrator program that can be found in Control Panel (Administrative Tools in 2000/XP)). Set the remote server name, database name and the authentication method (Windows integrated or SQLServer security).

Open Delphi, Add a TDatabase component. Set its Alias property to the DSN you've just created. Fill DatabaseName property with 'sqlConn' for example. Set Connected property to true. You'll see login prompt (SQL security) or connect directly (Windows integrated).

Add a TTable component. Set its DatabaseName property to 'sqlConn'. Select a table from TableName property.

etc...

Regards, Geo
0
 
mocartsCommented:
if you have SQL links installed with your BDE you can use Native BDE MS SQL driver.
in BDE administrator add new alias with database driver name MSSQL, set the SERVER NAME to your SQL server name, DATABASE NAME to your database name in server. test connectoin by trying to open alias.

all othre actions depends on what type of application you want to develop. you can use TQuery (preffered component with SQL server) or TTable by setting its DatabaseName to newly created Alias. You can use TDatabase component if you want control login process (by providing custom login dialog) or to control sessions.

wbr, mo.
0
 
CleanupPingCommented:
root_mailbox:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
geobulCommented:
Split the points
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now