Needs help in connection

Hi: Can any one please tell me what i did mistake in the connection string

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")
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
ps: AVOID using sa for applications !!!!
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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=;"
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:
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.

All Courses

From novice to tech pro — start learning today.