|
-
June 26th, 2009, 06:15 AM
#1
hi all
hi all , i need your help ..... how to connect from visual studio c++ 6.0 to mysql?? please tell me , i need this.
-
June 26th, 2009, 06:25 AM
#2
Re: hi all
You can use the CDatabase and CRecordset classes to connect to any datasource.
-
June 26th, 2009, 06:29 AM
#3
Re: hi all
foregzample i have some variable and i wont to write it in mysql , can u show me example?? thank you beforehand
-
June 26th, 2009, 07:00 AM
#4
Re: hi all
 Originally Posted by lasha
foregzample i have some variable and i wont to write it in mysql , can u show me example?? thank you beforehand
No, we don't want to do the work for you.
If you search for the CDatabase class or the CRecordset class you will find detailed descriptions including working examples.
If you encounter a certain problem using it feel free to ask here again.
With regards
Programartist
Last edited by ProgramArtist; June 26th, 2009 at 07:01 AM.
Reason: typo...
-
June 26th, 2009, 07:01 AM
#5
Re: hi all
- Open a database using CDatabase::OpenEx
- Create a SQL statement to INSERT INTO .... (or to UPDATE ...) data in your DB
- Use CDatabase::ExecuteSQL to write your new data to the DB
Have also a look at this thread.
Victor Nijegorodov
-
June 26th, 2009, 07:26 AM
#6
Re: hi all
 Originally Posted by VictorN
- Open a database using CDatabase::OpenEx
- Create a SQL statement to INSERT INTO .... (or to UPDATE ...) data in your DB
- Use CDatabase::ExecuteSQL to write your new data to the DB
Have also a look at this thread.
thank U
-
June 26th, 2009, 07:27 AM
#7
Re: hi all
 Originally Posted by ProgramArtist
No, we don't want to do the work for you.
If you search for the CDatabase class or the CRecordset class you will find detailed descriptions including working examples.
If you encounter a certain problem using it feel free to ask here again.
With regards
Programartist
thanks
-
June 26th, 2009, 07:36 AM
#8
-
June 26th, 2009, 07:46 AM
#9
Re: hi all
 Originally Posted by lasha
foregzample i have some variable and i wont to write it in mysql , can u show me example?? thank you beforehand
It looks like you need some introduction to database applications.
First of all, "write a variable in mysql" sounds senseless. A variable in C/C++ program is a memory region, but database never deals with variables directly. It's always required to establish some rule for putting/getting a variable to/from database. And details of the briging between both sides will depend on (more) the database scheme and (less) the database connectivity library/framework. Actually, there are lots of ways to put some value to some database, and correspondingly, there are lots of other factors and aspects that will affect the final choice. Previously recommended CDatabase class implies you mainly deal with ODBC (driver, DSN and the other stuff). But you may go with native MySQL library, or some other way you prefer. So, the thing is to become able to prefer something, that means "to gain some basic knowlege and skills" in more than one way of doing the thing. And please, do not expect somebody doing that choice for you.The same way, you definitely can expect anybody here will be glad to answer any of your concrete questions and share his experience.
Now it's the time for start asking.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|