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 expert 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 repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (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:

5 Answers

Accidentally formatted and erase the OEM factory recovery partition and can not reinstall one key recovery

dont worry, formatted and erased data re recoverable with asoftech data recovery program. you can download it from

I used this data recovery program before, quite easy to use and works well for me.

Apr 05, 2011 | Lenovo 3000 Y410 Laptop

2 Answers

I am student of BE 2nd year and i dont know that how to find frequancy response by using proteus so plese help me and sent me process of finding frequancy response i...

i don't know much about finding frequancy but i can help you just go through this links


Oct 29, 2010 | Computers & Internet

1 Answer

Hello. i have a dell inspiron 1300 laptop and havn't used it for past 1 year. now when im powering it, it requires password... i dont know what to do.. i have posted this problem in other few sites and...

If you don't have any information that you wanted stored on the laptop you could try to restore it back to factory settings (reinstall operating system, restore computer) and this would erase the password protection. THAT IS IF YOU DO NOT NEED ANY DATA ON THE HARD DRIVE because this would ERASE YOUR DATA. If your not able to do this from within the bios you will need to find the Recovery Dvds that could have come with this laptop.

Sep 07, 2010 | Dell INSPIRON 1300 Celeron 1.4GHZ,256MB...

1 Answer

Unlock password

which pasword is locked out. Windows password or startup bios password.

for windows password you can just format the system to remove it. if you need the data NT offline registry and Password editor can be used to remove the password.

if this is a BIOS password, there are hidden jump points that need to be used. This woudl require a service tech or a person very carefully jumping the positions so you dont' fry the board.

Jun 03, 2010 | Toshiba Satellite A100-S8111TD Notebook

1 Answer

My acer doesn't boot up @ all,charger is in good condition,and it is frustrating cause most of my work is stored in it,help please!!!!

have your laptop check by a certified comp tech, just to avoid data loss, if you are stating that all your work is in there, then you do anything to get it back, dont try to fixed it your self you have important data stored there,

Nov 26, 2009 | Computers & Internet

2 Answers

I put a game in my laptop and it says the CD-ROM can't be found

Hi, Thank You For Choosing FixYa!!!
If you Wish. I will take remote Control of your computer and I will try to Fix it. I will send a link to you. once I get reply.

Thanks, PREM

Mar 13, 2009 | Dell XPS M1530 Laptop

1 Answer

My data got lost and to know the best software download

Hi, The links below are the sites for Data Recovery Software. You can download through these sites and recover your lost data. Have a Great Day.....!

Mar 09, 2009 | HP Pavilion dv9000z Notebook

1 Answer

Lost picture files

You might try a program I have, I hate to make you try again but it is a really good recovery software I have used on many occasions.

A Student in 2nd year Podiatry lost an important case study, he was only backing up on an MP3 player that lost everything. This brought it all back.

Apr 11, 2008 | Computers & Internet

12 Answers


Direct Download

Jan 08, 2008 | IBM ThinkPad R40 2722 Notebook

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

Related Topics:

78 people viewed this question

Ask a Question

Usually answered in minutes!

Top Acer Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18331 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers


Level 3 Expert

5660 Answers

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

Answer questions

Manuals & User Guides