Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Connection String to Local Database Problem

Participant ,
Jan 12, 2010 Jan 12, 2010

Copy link to clipboard

Copied

I just copied a database on the development server which I am not owner of, but I have rights to the database. I copied it to my local server. Now I need to connect to the local database and I don't know how.

Dim MM_cnnName_STRING
MM_cnnName_STRING = "Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=xxx;Initial Catalog=DBName;Data Source=DevComputerName"

The above is what I used to connect to the development server. How can I figure out the string for my local MS SQL Server

TOPICS
Server side applications

Views

2.3K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 12, 2010 Jan 12, 2010

Copy link to clipboard

Copied

I thought I could change the Source attribute and the userame and password but that is not working.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

Copy link to clipboard

Copied

Have you created the local DSN?


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 12, 2010 Jan 12, 2010

Copy link to clipboard

Copied

I dont know what that is exactly. I can see my database in ms sql server manager on my local machine. I thought I didn't need a dns connection so I didnt go that route. Hmm I am still trying to figure it out.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

Copy link to clipboard

Copied

>I thought I didn't need a dns connection

You're right, you shouldn't. Is the server running on the default port?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2010 Jan 12, 2010

Copy link to clipboard

Copied

You might also try setting the network library to tcp/ip:

http://support.microsoft.com/kb/238949

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

What I ended up doing is opening visual studio started a project and from the object

explorer i viewed the database and got the connection string from the properties tab. Finally! ugh.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

Now I have this error once I try to bring up a page that calls the db

Microsoft OLE DB Provider for SQL Server error  '80004005'

Login failed. The login is from an untrusted domain  and cannot be used with Windows authentication.

/CourseList.asp, line  9

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

Is your connection string using the SSPI (Integrated Security=SSPI)  ?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

yes. This is what it is:

Dim MM_cnnTraining_STRING
MM_cnnTraining_STRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=xxx;Data Source=xxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=xxx;Use Encryption for Data=False;Tag with column collation when possible=False"

There's also a red x over the database in the server explorer now in Visual Studio.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

Have you tried removing that entry (Integrated Security=SSPI) ?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 13, 2010 Jan 13, 2010

Copy link to clipboard

Copied

LATEST

I get this when I try to connect when that item removed:

Microsoft OLE DB Provider for SQL Server error  '80040e4d'

Invalid authorization specification

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines