I am trying to connect my exisiting database ShinFlow.mdf to a MSHFlexGrid object in VB6 and am having some issues. I have the included code at the moment but am getting error:
SQL Network Interfaces: Error locating Server/instance specified [xFFFFFFFF]
Any ideas what I'm doing wrong? My experience in this area is very limited so any clues or ideas would be very helpful.
To preempt my next question does anyone have any links to some good resources on this area? I shall after the connection is established want to view, sort, run queries, modify entries, add new entries etc. and any pointers you have would be very much appreciated.
Thanks in advance
Dim cn As ADODB.Connection
Set cn = New Connection
cn.ConnectionString = "Provider=SQLNCLI.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;" & _
"AttachDBFileName=" & App.Path & "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ShinFlow.mdf;Data Source=server1\sqlexpress"
Dim rs As Recordset
Set rs = New Recordset
rs.Open "Select * from Job Table", cn
Set MSHFlexGrid1.DataSource = rs