Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1741
  • Last Modified:

Visual Basic SQLOLEDB.1

Hi
i'm connecting to a database perfectly from a website using the following in my config file.
                 <add key="Vendor" value="SQLServer" />
            <add key="ServerName" value="196.33.42.155" />
            <add key="DatabaseName" value="kncu" />
            <add key="UserName" value="kncuser" />
            <add key="Password" value="kncu1023" />
            <add key="Port" value="" />
i want to connect to the same database from a visual basic app,the app is giving me an error,saying that the connection string is incorrect,my connection string is as follows:
StrConn = "Provider=SQLOLEDB.1;Data Source=196.33.42.155;Initial Catalog=kncu;User Id=kncuser;Password=kncu1023"
can anyone tell me whats wrong,

0
corebiz
Asked:
corebiz
  • 3
  • 3
1 Solution
 
RimvisCommented:
You connection string looks OK. Can you post more of your code (connection part)
0
 
corebizAuthor Commented:
The code worked fine until the database server was changed,both the website and the vb app were using the following settings.
                <add key="Vendor" value="SQLServer" />
            <add key="ServerName" value="webboss.firsttech.net" />
            <add key="DatabaseName" value="KNCU" />
            <add key="UserName" value="kncuser" />
            <add key="Password" value="kncu1023" />
            <add key="Port" value="" />

StrConn = "Provider=SQLOLEDB.1;Data Source=webboss.firsttech.net;Initial Catalog=KNCU;User Id=kncuser;Password=kncu1023"

the new server is: 196.33.42.155
the dbName is: kncu
the changes work fine with the website,and for some reason it refuses to work  fot the vb app.

0
 
RimvisCommented:
What error do you get?
Syntax of you connection string is OK.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
corebizAuthor Commented:
it gives a runtime error,its breaking on the conection string.
0
 
RimvisCommented:
But what does this error say?
Can you show your code?
0
 
corebizAuthor Commented:
i found the problem,it was not the connection string,it was the firewall on the server that was not allowing the app to make a database connection..thnax for all your help :)
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now