reaching a database on network
-
hi i am on my pc on LAN and i woud like to make an application to reteive Data from a database located on the server of the LAN. i am programming with MFC,and i use the class CRecordset,and the method conssit to access to the database from ODBC (with ingres DATABASE), but when i add the the new class (MFC ODBC Consumer),i can't got the tables of the database(because when database is located on same PC,the ODBC give u the hand to show him the path of the database and the table that i would like to work with). can you help me ?
-
hi i am on my pc on LAN and i woud like to make an application to reteive Data from a database located on the server of the LAN. i am programming with MFC,and i use the class CRecordset,and the method conssit to access to the database from ODBC (with ingres DATABASE), but when i add the the new class (MFC ODBC Consumer),i can't got the tables of the database(because when database is located on same PC,the ODBC give u the hand to show him the path of the database and the table that i would like to work with). can you help me ?
The application does not need to know the location of the database it is accessing, that's what the DSN is for. Reconfigure your DSN so that it "points to" the correct location of the database. Then when you create your
CRecordset
object, reference the correct DSN.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne