[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to Configure User DSN (ODBC) on Client side Automaticallyonnection

Posted on 2004-09-16
3
Medium Priority
?
684 Views
Last Modified: 2013-11-14
I am using Remote Data Control in VB application and using user DSN for ODBC connection. I am using InstallShield to prepare Setup. I want to Configure ODBC on client side automatical through InstallShield or VB Code whichever is best. I have tried to set DSN in Installshield and it creates User DSN on Client side but It does not attach Database automatically for which I have to educate Client which i don't want to.
I need solution, ODBC file DSN can help me but how to set RdoConnect?

Ahmad Nawaz
0
Comment
Question by:abu_alahsan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Expert Comment

by:_agj_
ID: 12081942
0
 
LVL 7

Expert Comment

by:_agj_
ID: 12081957
0
 
LVL 3

Accepted Solution

by:
sgayatri earned 1500 total points
ID: 12082472
This is the way you can do from vb

Add 'ODBC driver & Datasource name functions'
 from project >> references to your project


Dim datasn As New Dsn
Dim str1 As String
Dim str2() As String
Dim con_string As String
con_string = "orcl"  ''' this is the database alias created thru net easy configuration on client side
On Error GoTo errhand
''''''    ***********************************************************
''''''    Data Source Name Creation                                 '
''''''    ***********************************************************
    str1 = datasn.GetOdbcDriverList(str2())
    For i = 0 To UBound(str2()) 'if the driver is existing then only create imagebase
        If str2(i) = "Microsoft ODBC for Oracle" Then    'Here replace the string which you want to create
               str1 = datasn.CreateDSN("fms", "Microsoft ODBC for Oracle", con_string, "", "society", "", "", True, "") ''' ODBC driver for sqlnet 7.3

'''here con_String is the database alias created on client side
''' society is the username in the database
           
           If str1 = False Then
                MsgBox "Unable to Create ODBC Data Source Name " + vbCrLf + " Check whether MSORCL32.dll file is Existing in C:\WINDOWS\SYSTEM directory!" + vbCrLf + "If Not Copy the file from other client and Register it Using REGSVR32!", vbInformation
           End If
           Exit Sub
        End If
    Next
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question