Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
im try to create local database in vb.net. but i got error msg.
my code is like that
Imports System.Data.SqlClient
Imports System.Windows.Forms.Binding

Public Class Form1
Inherits System.Windows.Forms.Form
Dim ds As New DataSet
Dim da As New SqlDataAdapter
'Dim DBcon AS New Sqlconnection("Data Source=.\Initial_Catalog=Esaymarks;"& Integrated Security=true;asynchronous proccessing=true")
Private DBConn As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\Amal\Documents\Visual Studio 2008\Projects\WindowsApplication11\WindowsApplication11\Database1.mdf";Integrated Security=True;User Instance=True")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
but error in this line
Data Source=.\SQLEXPRESS;AttachDbFilename="C
please correct this
thanks
Posted
Updated 8-Feb-12 18:41pm
v5
Comments
walterhevedeich 9-Feb-12 0:31am    
What's the error message?
Amal anjula 9-Feb-12 1:24am    
but error in this line
Data Source=.
\SQLEXPRESS;AttachDbFilename="C
please correct this
its underline with blue line

1 solution

What's the error message? Anyway check it
http://www.connectionstrings.com/[^]
 
Share this answer
 
Comments
Espen Harlinn 9-Feb-12 9:14am    
5'ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900