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:

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
http://www.asoftech.com/adr/

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

http://mic.sgmjournals.org/cgi/reprint/87/1/173.pdf

http://ajol.info/index.php/ajb/article/viewFile/59935/48207


http://www.rjbaudio.com/Proteus%20jr/proteus.html

thanxs

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.....! http://www.filerecovery.in/file-recovery/ntfs.asp http://www.recoverdata.in/ http://www.derescue.com/best-data-recovery-software.html

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.

LINK
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

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

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

joecoolvette
joecoolvette

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

Loading...