-
Jul 10th, 2016, 02:50 AM
#1
Thread Starter
Lively Member
[RESOLVED] Invalid Connection String Attribute
Hello,
Following is the connection string that i am using on my server machine, which works well on the same machine for running the app
Code:
ConData.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist " & _
"Security Info=true;Initial Catalog=master;Data Source=192.168.1.109,49158;username=username;password=passowrd"
But When i run the same program in another machine i get the error "Invalid connection String Attribute".
Could someone help me on what the problem might be here?
Thanks.
-
Jul 10th, 2016, 05:41 AM
#2
Re: Invalid Connection String Attribute
Check here: Connection Strings on section Microsoft OLE DB Provider for SQL Server.
-
Jul 10th, 2016, 08:37 AM
#3
Thread Starter
Lively Member
Re: Invalid Connection String Attribute
Thx fro the reply KGComputers, but i dont think if i have done anything that is not already in that site. According to me i have done the same thing.
-
Jul 10th, 2016, 10:11 AM
#4
Re: Invalid Connection String Attribute
You need to check a bit more carefully... if your string isn't exactly the same as one of theirs (apart from the values, such as the IP address), then you have probably got it wrong.
At a glance, there are two obvious major differences:
- you have "username=", and that doesn't appear anywhere on their page.
- you have specified two different types of login: a username/password (for a SQL Server login), AND specified to not use that (use a Windows login). You should only have one listed.
-
Aug 6th, 2016, 10:25 AM
#5
Thread Starter
Lively Member
Re: Invalid Connection String Attribute
ok guys, now im using the follwoing sql connection string but now i am receiving another error.
ConData.Open "Driver={SQL Server Native Client 10.0};Server=my-pc\sqlexpress;" & _
"Database=master;Uid=muzamilsajid;Pwd=mypass;"
this is working well on the server machine where sqlserver 2008 is installed but i dont get it as to why its not working on other machines. I get the following error.
[Microsoft][Sql Server native Client 10.0]Sql server network interface error Locating Server/instance specified [xFFFFFFFF]
Any help will be appreciated please guys, im stuck on this for almost 2 weeks now...i was trying it on my own with different connection strings before comming back to you guys. But it seems like i have reached a dead end were my head is like coming off now.....
-
Aug 6th, 2016, 10:38 AM
#6
Thread Starter
Lively Member
Re: Invalid Connection String Attribute
Thank you for taking out some of your time for this guys but finally i got it solved.
I just had to start the SQL Browser Service on my server machine and now all the connection strings are working without any issues.
Thank you very much..
I am sure ill soon come with another problem on hand.
Thanks..
-
Mar 14th, 2019, 09:23 AM
#7
New Member
Re: Invalid Connection String Attribute
What is the SQL browser service? even i am also getting "Invalid connection String Attribute" error
-
Mar 14th, 2019, 10:44 AM
#8
Re: [RESOLVED] Invalid Connection String Attribute
Welcome to VBForums
The SQL Browser service probably isn't relevant to you, because that was in relation to a different error (see post 5), and is specific to SQL Server. If you need to solve that error, you can find Services in Control Panel - Admin Tools.
In terms of the error "Invalid connection String Attribute", the issue is almost certainly that you have a mistake in your connection string.
Use the site that was linked in post #2 to find a valid example connection string for the database system you are using and your situation, and make sure that yours is the same (except for things like the database name, etc).
If you can't fix it with that, create a new thread here: http://www.vbforums.com/forumdisplay...se-Development ...and show us the section of code containing your connection string.
-
Mar 14th, 2019, 10:52 AM
#9
New Member
Re: [RESOLVED] Invalid Connection String Attribute
Provider=sqloledb;Trusted_Connection=Yes;Data Source=Server name;Initial Catalogue=Name of the Database;username=username;password=password
This is the piece of code i have used.
I am using Microsoft SQL Server 2014
Last edited by Abhi1987; Mar 14th, 2019 at 10:56 AM.
-
Mar 14th, 2019, 10:53 AM
#10
New Member
Re: [RESOLVED] Invalid Connection String Attribute
please correct if anything is incorrect or i am missing.
Last edited by Abhi1987; Mar 14th, 2019 at 10:56 AM.
-
Mar 14th, 2019, 11:04 AM
#11
Re: [RESOLVED] Invalid Connection String Attribute
I'm afraid that is incorrect in a variety of ways, and the way to solve it is to follow the advice I gave before:
Originally Posted by si_the_geek
Use the site that was linked in post #2 to find a valid example connection string for the database system you are using and your situation, and make sure that yours is the same (except for things like the database name, etc).
If you can't fix it with that, create a new thread here: http://www.vbforums.com/forumdisplay...se-Development ...and show us the section of code containing your connection string.
Note that if you do need help, creating a new thread is important (most people wont even look at your posts here), and posting just the connection string is not enough - the code around it is important too.
-
Mar 14th, 2019, 11:25 AM
#12
New Member
Re: [RESOLVED] Invalid Connection String Attribute
I have created a new thread .. m not able to figure out the solution in post 2 .. please help me find the solution in my new thread .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|