Data Source connection
-
Hi sir, I have deleloped one dialog based application,where I will enter username and password and i have a created a button(Save). my plan is when i click the button i wnat it to save it in a database. I have created a database I have used this steps In SQL Server Enterprise MAnager I have created a new database as "Sample" and also created a new table there and two columns as "Name" and Password. Now i am not getting how can i connect to database I am totally struct and messing around,please give me any idea how can i process. Thanks Raj
-
Hi sir, I have deleloped one dialog based application,where I will enter username and password and i have a created a button(Save). my plan is when i click the button i wnat it to save it in a database. I have created a database I have used this steps In SQL Server Enterprise MAnager I have created a new database as "Sample" and also created a new table there and two columns as "Name" and Password. Now i am not getting how can i connect to database I am totally struct and messing around,please give me any idea how can i process. Thanks Raj
-
Hi sir, I have deleloped one dialog based application,where I will enter username and password and i have a created a button(Save). my plan is when i click the button i wnat it to save it in a database. I have created a database I have used this steps In SQL Server Enterprise MAnager I have created a new database as "Sample" and also created a new table there and two columns as "Name" and Password. Now i am not getting how can i connect to database I am totally struct and messing around,please give me any idea how can i process. Thanks Raj
if your's application is MFC based application, CDatabase class is there for manipulate database. If you wanna manipulate your database, you should make following steps.. 1. Build ODBC connection string for SQL server for this refer to connectionstring.com 2. Create object for CDatabase 3. Using CDatabase::Open() function get connection to your database 4. Using CDatabase::ExecteSQL() run your insert query.. 5. Finally close the connection CDatabase::Close().. -suzuu