• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1756
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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