Domanda

In the Data Environment, you can setup the connection via accessing the Properties of the connection.

enter image description here

From there, you can choose the provider, the server name, and the database (I am using SQL Server 2008, by the way).

However, I see a problem in this since the connection string cannot be altered anymore once deployed. Therefore, I set the connection string of the Data Environment Connection during log on.

With deMain.conn1
    .ConnectionString = connString
End With

where connString is a global variable containing the connection string that is read from a .ini file.

I ran the program and encountered the following error:

enter image description here

È stato utile?

Soluzione

I figured it out. In the Properties window of the Data Environment Connection, you must select first the correct Provider and click Next.

enter image description here

In the Connection tab, you don't have to fill-out the fields anymore.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top