Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All
i have an attendance machine that has database type : Access
called "Att2000.mdb"
i did my own application with C#
but i wanna enter the connection String that access the machine's database ("Att2000.mdb")
using my app
_____
Attendance machine has
IP Address
Port Number
____
I tried to enter the IP through my Connection String but my app did't work properly
so any one can help me to make my application fetch the data from Attendance machine
Posted

1 solution

Without knowing exactly what you tried as a connection string, it is difficult to do anything other than give general advice:
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 
Comments
Ahmad Alweshahi 25-Jan-13 3:33am    
Firstly thank you for replying ,
i wanna connection string to get data from database "att2000.mdb"
your opinion is true but in local PC or a PC in a network,
but in attendance machine ? i don't think it is true,
i write connection string using IP but it didn't work properly
how can i access this machine ?
i can't access it , so i can't access the database "att2000.mdb"
_________________
i wanna fetch the data from the machine's database
to manipulate it in my own app
_____
may i forget something.
OriginalGriff 25-Jan-13 3:36am    
If you can't access it from it's IP via VS, then you can't access it via it's IP from your code - at least the VS trial gives you a (slightly) user friendly face to try it with.

It doesn't matter what equipment is at the other end, as long as it provides "shares" of some form then you can access the files. If it doesn't, then you can't. (And there is no guarantee that you can use them once you get to them - it depends on teh code in teh equipment)
Ahmad Alweshahi 25-Jan-13 3:48am    
using VS
I can specify the server ,and then VS gets all database in that Server is it true ?
in VS :
1- i select the data source if it SQL or Access
2- i selected Access, So the second step is browse the database File .mdb
So i must Access the machine to get the database machine "att2000.mdb"
and the big problem is : how to access that machine to get the database
is it true ??
Or i missing Something ??
OriginalGriff 25-Jan-13 4:13am    
I suspect you left it on the default of "Microsoft SQL Server (SqlClient)" rather than selecting "Microsoft Access Database File (OLE DB)"...
Ahmad Alweshahi 25-Jan-13 11:21am    
no no in the first of the post i said the database is access and the file name is
"att2000.mdb"
so any one has any solution :)
and thank you OriginalGriff for trying help me :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900