Solved

connection to MS SQL server using delphi  7 Professional

Posted on 2003-11-18
5
1,658 Views
Last Modified: 2013-11-23
what is the best way to connect to MS SQL server using delphi 7 Pro??

I dont mind paying for a component.......

I have seen dbexpress from crlab.com


comments anyone???
0
Comment
Question by:alchemy9
5 Comments
 
LVL 17

Expert Comment

by:geobul
ID: 9770370
Hi,

I use ADO components which are built in Delphi (using 'Microsoft OLE DB Provider for SQL Server' in the connection string) and have no problems.

Regards, Geo
0
 

Author Comment

by:alchemy9
ID: 9770424
is the ole db provider included with professional or only enterprise

just seen this link as possible atlernatives

http://www.kylecordes.com/bag/index.html
0
 

Expert Comment

by:nick-p
ID: 9772574
The best way is actually through ADO...

Create a connection object, and click the connectionstring option and select the 'Microsoft OLE DB Provider for SQL Server'...

Make sure you are using a nt based system, because this doesn't work well with 95/98/ME, at least from my experience...
0
 

Expert Comment

by:nick-p
ID: 9772590
I forgot to add... make sure you update your MDAC to 2.8... Go to microsoft's download page...
0
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 250 total points
ID: 9777946
Personally I prefer ADO. But you have to decide if you want to use the ADO component sets or import the ADO type library directly. If you want to create a multi-tier application then I would suggest to import the type library. This will keep the serverside DLL's a bit smaller and better optimized. But for a simple desktop application with a database connection the ADO components should be more than good enough. And they are already part of D7Pro! :-)

ADO works a bit like the BDE. You have a connection, which is similar to a database in BDE. You have ADOTables and ADOQueries which are similar to TTable and TQuery components. You have a TADODataset which is a bit more generic component which is more useful if you create a multitier application. And you have the ADOCommand which can be used to call stored procedures, execute queries that don't return recordsets and some other uses. But of course you can also use ADOStoredProc to call a stored procedure.
ADO also offers the RDSConnection component which can be used to connect to a remote system and let the remote system call the database but this is only useful combined with the ADODataset component. I haven't found much use for it yet.

I hope you didn't mean MySQL instead of MS SQL. For MySQL you better use dbExpress instead.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now