|
-
May 13th, 2013, 03:38 PM
#1
Thread Starter
New Member
data source nameing
I have written my first app using a database. The connection works fine on all pc's it's loaded on but one. The PCs all have the same load so at first I thought it was permissions.
the error is "...error occurred while establishing a connection to SQL server ..... error:26..."
Now I am suspecting that it is my data source name.
Is there a way to automatically name the datasource, if that is my problem.
I've added users and changed permissions in my security tab under properties but no luck.
Again this is the first app I have using a database and honestly I really do not know what i'm doing.
Public m_cn2 As New SqlConnection()
Public m_cn2mdfPath As String = "C:\UCAL\WatchdogPCRevison.mdf"
Public m_DA2_T1 As SqlDataAdapter
Public m_CB2_T1 As SqlCommandBuilder
Public m_DataTable2_T1 As New DataTable
Public m_rowPosition2_T1 As Integer = 0
Public m_drNewRow2_T1 As DataRow = m_DataTable2_T1.NewRow
m_cn2.ConnectionString = "Data Source=.\SQLEXPRESS; AttachDbFilename = " & _
m_cn2mdfPath & ";Integrated Security=True; Connect Timeout=30;" & _
"User Instance=True"
Any help would be appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|