Adococ

databases United States
  • 19 years ago

    Alright, I have an address book program with 2 main forms, one is the specific information form, which you click a button on the main form to get to, on the main form im using a listbox and a 'adococ' active x i think its called, its in one of the windows big packs (IE common controls 6.0) but to use this adococ you have to set a speficic path thru going into it, not just setting one propertiy, ineed to know a way to make the path its looking for app.path & "\source.mdb"

  • 19 years ago

    I presume what you mean is that the Connection String contains the path to the db, which you are setting at design time, and you want to be able to set it at run time. In which case, simply do something like this in form_load:


    Adodc1.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\thedb.mdb;Persist Security Info=False"


    and then connect to the db using Adodc1.Refresh

  • 19 years ago

    THANK YOU!!!!!!!!!!

  • 19 years ago

    I have a question on adobc too. Everytiime I try to add a record to the database, the new record will overwrite the first record. My code likes this


    adoCustomer.Recordset.AddNew


    Can anyone helps me? Thank you.


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An idiot with a computer is a faster, better idiot” - Rich Julius