Solved

Needs help in connection

Posted on 2007-03-21
3
156 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 video teaches viewers about errors in exception handling.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

810 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