Results 1 to 2 of 2

Thread: Connection

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    INDIA
    Posts
    31

    Connection

    Hi All,

    I am new to VB.NET.

    I want to open a connection globally (so that i can use that connection object at any where with the project) for that what i have to do.

    Is i requried to use class? If so please anybody send some code.


    Thanks in advance

    Regards

    Nag K.
    Nagendra K

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Put this code (after you change it to correct data) in a class file , then you can use it without instantiating objs .
    VB Code:
    1. Public Shared conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\aaaa;Jet OLEDB:Database Password=passwordddd")

Posting Permissions

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



Click Here to Expand Forum to Full Width