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

    MVP:

    An expert that got 5 achievements.

    Governor:

    An expert whose answer got voted for 20 times.

    Hot-Shot:

    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 123eng.com

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


    #include


    #include


    #include






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


    #include


    #include


    #include






    int main(void)


    {


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


    HDBC hDBC = NULL;
    // Connection handle


    HSTMT hStmt = NULL;
    // Statement handle


    UCHAR szDSN[SQL_MAX_DSN_LENGTH] =
    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
    password.


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






    if (retcode == SQL_SUCCESS || retcode ==
    SQL_SUCCESS_WITH_INFO)


    {


    // Allocate memory for the statement
    handle


    retcode = SQLAllocStmt (hDBC, &hStmt);






    // Prepare the SQL statement by 
    assigning
    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
    models


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






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


    retcode = SQLFetch (hStmt);






    while (retcode == SQL_SUCCESS || 
    retcode
    == SQL_SUCCESS_WITH_INFO)


    {


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


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


    }






    // 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;


    }


    http://www.123eng.com/sourcecode/c++/alg...

×

1 Suggested Answer

6ya6ya
  • 2 Answers

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

Hi,
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.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

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

Data


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 ------

http://www.dasofts.com/software/3675-recover-my-files-3.98-build-6218.html


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.



Thanks


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

1 Answer

Connection code


Hello,
_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

DRIVER REQUIRED FOR rELIANCE DATA CARD MODEL MC315+


Direct Download
http://download.it168.com/driverfiles2/0432/ZTE_MC315_drv10.exe

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:

78 people viewed this question

Ask a Question

Usually answered in minutes!

Top Acer Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18381 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Mohammed Ebrahim M
Mohammed Ebrahim M

Level 3 Expert

556 Answers

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

Answer questions

Manuals & User Guides

Loading...