Error : [ODBC Driver Manager] Data source name not found and no default driver specified

asked 2022-06-16T10:07:58.903+00:00
venkatesh padmanabhan 181 Reputation points

Hi.
I am trying to connect to AS 400 connection string from my visual studio code.

Dim ConnString As String
Dim As400Conn As Object
ConnString = "DSN=" + "DSN value" + ";" + "UID=" + "UID" + ";" + "PWD=" + "PWD" + ";"
As400Conn = CreateObject("ADODB.Connection")
As400Conn.Open(ConnString)

I am getting error as : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

SOURCE : Microsoft OLE DB Provider for ODBC Drivers

How to fix this ? Thanks

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,828 questions
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2022-06-17T02:15:05.37+00:00
    Jiachen Li-MSFT 10,836 Reputation points Microsoft Employee

    Hi @venkatesh padmanabhan ,
    Please check if the solution in the link below worked for you.
    https://stackoverflow.com/questions/17115632/microsoftodbc-driver-manager-data-source-name-not-found-and-no-default-drive
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments