|
|
Home » U++ Library support » U++ SQL » db access to MS ACCESS
db access to MS ACCESS [message #16809] |
Sat, 12 July 2008 15:35  |
maxmeier
Messages: 9 Registered: July 2008 Location: Nürnberg
|
Promising Member |
|
|
Hi,
does anyone have a code example (or a link to) how to
- login MS Access
- perform a select stmt to an Access-Table
- performm an update/insert
??
Any tip appreciated!
Thanks in advance
maxmeier
|
|
|
Re: db access to MS ACCESS [message #16810 is a reply to message #16809] |
Sat, 12 July 2008 18:32   |
|
These question are not strictly upp related. Please try to find the answers yourself. Net is full of information about MS Access. Inserting/updating/removing in upp is done on low level using sql commands.
|
|
|
|
Re: db access to MS ACCESS [message #16812 is a reply to message #16811] |
Sat, 12 July 2008 19:28   |
|
maxmeier wrote on Sat, 12 July 2008 13:03 | When I try to connect to MS Access by means of upp, then it is of course strictly upp-related.
The point is, that only sparse documentation exists and sources are scarcely documented.
If you deliver a framework that is such complete different from other ones, you should provide more and better help for beginners.
Upp-Team likes to compare with wxWidgets - you should also compare the bookware!
ciao
maxmeier
|
The documentation is a work in progress. As for your questions -did you take a look at references and examples? You'll find there how to open connection, read/write to database. The only difference is you have to replace sqlite/mysql/postgres plugin with oledb and provide proper connection string (this is what I meant you're able to find on net) in oledb Open method. Rest is the same (of course you have to use ms access sql dialect).
PS: Connection string format to ms access: http://www.connectionstrings.com/?carrier=access
PS2: Your code should look like this:
#include <OldDb/OleDb.h>
OleDbSession db;
db.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=topsecret");
SQL = db;
SQL.Execute("select name from persons");
while(SQL.Fetch())
{
cout << SQL[0] << "\n";
}
[Updated on: Sat, 12 July 2008 19:45] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 03:00:11 CEST 2025
Total time taken to generate the page: 0.02119 seconds
|
|
|