0

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

#include<stdio.h>
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

3
Contributors
2
Replies
13
Views
8 Years
Discussion Span
Last Post by shiv1
-1

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

#include<stdio.h>
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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.