Hello Everyone,
I am a experienced VB6 develped and i have recently migrated to VB 2005.
Things were getting alone fairly fine until i tried to attach database to my application. And now its a night mare.
I have a MS Access 2000 database (mdb) with few tables. I want to create a working model thru code so that i can get and put data in any table i want.
I was able to add the mdb to my project thru data source tab and wizard. i want to use code to do all the processing rather than controls.
Now name of my dataset is maindbdataset. There are 2 problems i am facing...
1. The connection string is hardcoded in settings. So if the database is not in application path an error comes. I want that i can select database path at run time.
Is there a way to change path of maindbdataset at runtime or so. I tried my.settings thing but didnt work.
2. In VB6 ADO control we had options like .move first , .move next and so on. can i do something like that using code or i need to use sql language only.
I would be glad if anyone can help.
Thanks,
GR
I am a experienced VB6 develped and i have recently migrated to VB 2005.
Things were getting alone fairly fine until i tried to attach database to my application. And now its a night mare.
I have a MS Access 2000 database (mdb) with few tables. I want to create a working model thru code so that i can get and put data in any table i want.
I was able to add the mdb to my project thru data source tab and wizard. i want to use code to do all the processing rather than controls.
Now name of my dataset is maindbdataset. There are 2 problems i am facing...
1. The connection string is hardcoded in settings. So if the database is not in application path an error comes. I want that i can select database path at run time.
Is there a way to change path of maindbdataset at runtime or so. I tried my.settings thing but didnt work.
2. In VB6 ADO control we had options like .move first , .move next and so on. can i do something like that using code or i need to use sql language only.
I would be glad if anyone can help.
Thanks,
GR