By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,327 Members | 2,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,327 IT Pros & Developers. It's quick & easy.

sql server database 2005 connection error

P: 1
Expand|Select|Wrap|Line Numbers
  1. myConn.Open()
  2.             myCommand.ExecuteNonQuery()
  3.             MessageBox.Show("Database is created successfully", _
  4.                             "MyProgram", MessageBoxButtons.OK, _
  5.                              MessageBoxIcon.Information)
  6.             Dim DbConStrng2 = "Data Source=.\SQLEXPRESS;AttachDbFilename=" & DbFullPath & ";Integrated Security=True;Connect Timeout=30;User Instance=True"
  7.             Dim DbConnection As SqlConnection = New SqlConnection(DbConStrng2)
  8.             Dim obj As New SqlCommand
  9.             Dim DbReader As SqlDataReader = Nothing
  10.  
  11.      Line no. 114      If createTable(obj, DbConnection, DbReader, DbConStrng2) Then
  12.            MessageBox.Show("Tables Created successfully")
  13.      End If
I am getting the attached error on line no. 114
Attached Files
File Type: docx Doc1.docx (277.0 KB, 261 views)
Jun 25 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.