Question about Acer Aspire 5315 Notebook

1 Answer

Linking c++ & msaccess

I'm arun doing B.Tech It 2nd Year
I dont want any software
I want to know how to store the datas gahtered by c++ into msaccess as a database file
For eg; in my college i'm no having a project named LIBRARY MANAGEMANT SYSTEM for which i have to write codes in c++,
get the inputs such as student name,roll no,etc & it is to be stored in the msaccess as a database file,but i dont know how to store it,i.e;the way to write code in c++ as well as to link the msaccess.
Please provide me the info in steps

Posted by on


1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert that got 5 achievements.


    An expert whose answer got voted for 20 times.


    An expert who has answered 20 questions.

  • Expert
  • 158 Answers

Posted on Jan 12, 2009

  • Prashant Bharadwaj
    Prashant Bharadwaj Jan 12, 2009

    I got this sample from

    // This program connects to an ODBC data source called "db97". It then
    executes a SQL statement “SELECT Model




    // This program connects to an ODBC data source called "db97". It then
    executes a SQL statement “SELECT Model




    int main(void)


    HENV hEnv = NULL;
    // Env Handle from SQLAllocEnv()

    // Connection handle

    HSTMT hStmt = NULL;
    // Statement handle

    db97"; // Data Source Name buffer
    UCHAR* szUID = NULL;
    // User ID buffer

    UCHAR* szPasswd = NULL;
    // Password buffer

    UCHAR szModel[128];
    // Model buffer

    SDWORD cbModel;
    // Model buffer bytes recieved

    UCHAR szSqlStr[] = "Select Model From
    Makes Where Make='Vauxhall'"; // SQL string

    RETCODE retcode;
    // Return code

    // Allocate memory for ODBC Environment handle

    SQLAllocEnv (&hEnv);

    // Allocate memory for the connection handle

    SQLAllocConnect (hEnv, &hDBC);

    // Connect to the data source "db97" using userid and

    retcode = SQLConnect (hDBC, szDSN, SQL_NTS, szUID,
    SQL_NTS, szPasswd, SQL_NTS);

    if (retcode == SQL_SUCCESS || retcode ==


    // Allocate memory for the statement

    retcode = SQLAllocStmt (hDBC, &hStmt);

    // Prepare the SQL statement by 
    it to the statement handle

    retcode = SQLPrepare (hStmt, szSqlStr,
    sizeof (szSqlStr));

    // Execute the SQL statement handle

    retcode = SQLExecute (hStmt);

    // Project only column 1 which is the

    SQLBindCol (hStmt, 1, SQL_C_CHAR, 
    sizeof(szModel), &cbModel);

    // Get row of data from the result set
    defined above in the statement

    retcode = SQLFetch (hStmt);

    while (retcode == SQL_SUCCESS || 


    printf (" %s
    szModel); // Print row

    retcode = SQLFetch
    (hStmt); // Fetch next row from result 


    // Free the allocated statement handle

    SQLFreeStmt (hStmt, SQL_DROP);

    // Disconnect from datasource

    SQLDisconnect (hDBC);


    // Free the allocated connection handle

    SQLFreeConnect (hDBC);

    // Free the allocated ODBC environment handle

    SQLFreeEnv (hEnv);

    return 0;




1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

a 6ya Technician can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repair professionals here in the US.
click here to Talk to a Technician (only for users in the US for now) and get all the help you need.

Posted on Jan 02, 2017


Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

2 Answers

Hi My ps3 doesnt load games from bluray disc anymore, it plays audio cds.... this happened when i installed the latest update 3.56, i backed up files and formatted disc and i could load games again from...

This is the 2nd most common problem with PS3's. This isn't a bad problem. Your laser/lens will need to be replaced. There are many videos on youtube if you would like to do it yourself (I would advise you not to). I recommend that you find a technician who has experience. There are many things that can go wrong.

If you do, you must disassemble your drive and take out the laser to see exactly which laser you will need to purchase

Jan 28, 2011 | Sony Playstation 3 (PS3) Console

1 Answer

I have a 1993 mr2 and need an engine loom diagram for when i fit the replacement engine

I can help! Are you doing a N/A to turbo swap? Or just engine for engine? Mostly year for year will be the same...JDM or USDM. Depending on year...My first suggestion would be to go to Toyota and buy the 2 Big Green Books for your year. They have FULL wire diagrams amongst COUNTLESS things you will need to know. 2nd...I would go to MR2 tech .com...They have most of the pages of the BGB there. Anything you need let me know! Ive done many swaps in the 2nd gen. Good luck!

Apr 06, 2010 | 1993 Toyota MR2

1 Answer


go to the bios system restore that from there and if u dont know how to do that then just get ur pendrive scanned and move to a nearby tech store he will store it in bios and then he will formate it with bios he will charge around 200Rs

Sep 21, 2009 | Transcend (589307) Media

1 Answer

How to link vb 6.0 to msaccess?

You Need ODBC to solve your link... ODBC is a gateway. Can Access by Microsoft Access or VB in same time... Note: Please in Code Programming you must lock or unlock you data if you want application running same time..

Jul 20, 2009 | Microsoft Computers & Internet

1 Answer

How to connect 3 tables ang get report

You would create relationships between your tables assuming there is a correlation in the data you are using.

Feb 15, 2009 | Microsoft Computers & Internet

1 Answer

G-Tech drive broken

Ok,Download software for recover your data from Memory Card, Phone, HDD or any other Storage Device ----
Download from the following link ------

Note- this software is works only with windows operating system so, connect your Memory Card, Phone, HDD or any other Storage Device to computer to recover data.

For any other help contact me.


Aug 11, 2008 | GTech G-Tech G-Drive Mini 2.5 Portable...

1 Answer

Connection code

_ConnectionPtr con; cn.CreateInstance(__uuidof(connect)); 
OLEDB cn->Open(L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\database.mdb;Persist Security Info=False","","",adOpenUnspecified);
ODBC cn->Open("Driver={Microsoft Access Drive (*.mdb)};;Persist Security Info=False;Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;)

I hope this helps.
Thanks, Raphael

Aug 07, 2008 | Wizoo Darbuka

12 Answers


Direct Download

Jan 08, 2008 | IBM ThinkPad R40 2722 Notebook

1 Answer

Hard drive crash

if your HD cannot be detected anymore..then there would be 90% chance that your data's cannot be retrieve. however, if it is still functional as a secondary drive but the partition is damage..try using FileScanvenger to retrieve the data.

Oct 25, 2007 | Computers & Internet

Not finding what you are looking for?
Acer Aspire 5315 Notebook Logo

Related Topics:

79 people viewed this question

Ask a Question

Usually answered in minutes!

Top Acer Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18413 Answers

Mohammed Ebrahim M
Mohammed Ebrahim M

Level 3 Expert

636 Answers

Alun Cox

Level 3 Expert

2678 Answers

Are you an Acer Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides