Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Connect to DSN (VB6)

    Not sure if I've asked this before, had a quick look at my history.

    I have a DSN (SW1) which links to a Dataflex 2.3b database.

    I would like to create a !! Datasheet !! type of form with some kind of conditional formatting.
    I'd rather it be in VB so I can create an EXE instead of complicated process's with different versions of Microsoft Access.

    I have this working in Access on a single pc, but now need others to share the information.

    I would possibly have to connect to the DSN on form load, and then populate the grid/datasheet there on.

    Any help in this would be appreciated, examples or specific VB add-ins recommended etc.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Connect to DSN (VB6)

    Hi Dave,

    Try the following:
    - Create a new text file (it can be anywhere, it's only temporary).
    - Change its name to test.udl. Confirm that it's ok to change the extension.
    - Double click test.udl.
    - Specify that you want to use a connection string, then click Build...
    - Look up the data source, etc.
    - When you're done, you can test if the connection works.
    - The Connection string box will contain a string that you can use in the ConnectionString property of an ADO Data Control, or you create an ADO connection object and open a recordset.

    Sorry not to be more specific.

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Connect to DSN (VB6)

    Hans

    Thanks for the head start on this.
    I've messed about with the ADO control before so this might be the place to start.
    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •