Solved

Basics of connecting to a local MSSQL server with Delphi

Posted on 2008-10-13
4
1,055 Views
Last Modified: 2013-11-23
Hi,
Although I know nothing about database programming, I need to connect to a local MSSQL Server Express 2008 using Delphi 2009 Trial to create a database that will in turn contain 1 table with 2 columns. First column holds the key second column contains long text like an article for example.
few lines will be more than helpful
thanks in advance
0
Comment
Question by:Alavna
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Praveen_WS
ID: 22701149

Try to use ADO. Connection string is the same as for MS SQL Server 2000 but
Provider=SQLNCLI instead of Provider=SQLOLEDB.

Try to connect to master at first. Enabled Windows authentication
(for Integrated Security=SSPI)?
If not, use user name/password. Later you will be able to create more databases.
0
 

Author Comment

by:Alavna
ID: 22701203
thanks for the reply. I added an ADOConnection component. And configured the connection string. What else do I need to do? As I said this is my first attempt at database programming. I created the database and the table manually. Just need to connect to these. Queries etc..are another story....
thanks
0
 

Author Comment

by:Alavna
ID: 22701266
I am able to connect to the database in question now using this string
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=myserver\alavna;Initial Catalog=mycms;Data Source=localhost\SQLEXPRESS;

Just need an example of how to create more records or query others. thanks
0
 
LVL 1

Accepted Solution

by:
Praveen_WS earned 500 total points
ID: 22701300
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

16 Experts available now in Live!

Get 1:1 Help Now