Link to home
Start Free TrialLog in
Avatar of Alavna
Alavna

asked on

Basics of connecting to a local MSSQL server with Delphi

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
Avatar of Praveen_WS
Praveen_WS
Flag of India image


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.
Avatar of Alavna
Alavna

ASKER

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
Avatar of Alavna

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Praveen_WS
Praveen_WS
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial