954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Question on how to connect MS access database to C program

Hello, I just only want to ask.How to connect MS access database to a C program.See the code below:

#include
char firstname[20], middlename, lastname[20];
main()
{
clrscr();
printf("Enter your First Name: ");scanf("%s",&firstname);
printf("Enter your Middle Name: ");scanf("%c",&middlename);
printf("Enter your Last Name: ");scanf("%s",&lastname);
getch();
}

This is what I want to do for example I have a database file named myname.mdb and in that database there are three fields: fname, mname and lname.

I want the value of firstname pass to fname, middlename pass to mname, and lastname pass to lname

yabuki
Newbie Poster
7 posts since Jan 2009
Reputation Points: 10
Solved Threads: 2
 
John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

Hello, I just only want to ask.How to connect MS access database to a C program.See the code below:

#include char firstname[20], middlename, lastname[20]; main() { clrscr(); printf("Enter your First Name: ");scanf("%s",&firstname); printf("Enter your Middle Name: ");scanf("%c",&middlename); printf("Enter your Last Name: ");scanf("%s",&lastname); getch(); }

This is what I want to do for example I have a database file named myname.mdb and in that database there are three fields: fname, mname and lname.

I want the value of firstname pass to fname, middlename pass to mname, and lastname pass to lname

f

shiv1
Newbie Poster
1 post since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You