Solved

Needs help in connection

Posted on 2007-03-21
3
137 Views
Last Modified: 2010-04-30
Hi: Can any one please tell me what i did mistake in the connection string
Thanks.

Dim j, vArr, rs As DAO.Recordset, nLine
Dim DBConn
Dim rs
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=SQLOLEDB; Data Source=KMS0062K\DEVELOPMENT; Initial Catalog=mgt_Admin; User ID=sa"
Dim sSQL As String

Set rs = CurrentDb.OpenRecordset("tblInfo")
0
Comment
Question by:mustish1
  • 2
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18766584
apart from the sapced thatI would not put in there, and the missing password part, there seems nothing wrong:

cn.Open "Provider=SQLOLEDB;Data Source=KMS0062K\DEVELOPMENT;Initial Catalog=mgt_Admin;User ID=sa;PWD=;"
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18766586
ps: AVOID using sa for applications !!!!
0
 
LVL 10

Expert Comment

by:Clif
ID: 18766598
Aside from (possibly) a password, I couldn't say without more information.

What error(s) do you get?

You might find more information on connection strings here:
http://www.connectionstrings.com/
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now