i'm learning Vb2010 data base from: http://www.vbtutor.net/index.php/vis...010-lesson-30/
wasn't easy undertand that i must:
- create mdf file from 'New Item' and choose 'Service-based Data Base';
- when we click on these item, on Left Side, we create a new table;
- after we create a new table, we click on right mouse button for show the menu and choose 'Show Table Data'. and here we can add table index elements.
but my problem, now is connect my database :(
i get these 2 errors:
"A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll
A first chance exception of type 'System.TypeInitializationException' occurred in ManutencaoDeAutomoveis.exe"
please anyone can advice me?
wasn't easy undertand that i must:
- create mdf file from 'New Item' and choose 'Service-based Data Base';
- when we click on these item, on Left Side, we create a new table;
- after we create a new table, we click on right mouse button for show the menu and choose 'Show Table Data'. and here we can add table index elements.
but my problem, now is connect my database :(
Code:
Public MyCn As New SqlConnection
MyCn.ConnectionString = "Data Source=lenovo-4903350b\mssmlbiz; AttachDbFilename=C:\ManutencaoDeAutomoveis\ManutencaoDeAutomoveis\Database1.mdf; " & _
"User Instance=True;Integrated Security=SSPI""A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll
A first chance exception of type 'System.TypeInitializationException' occurred in ManutencaoDeAutomoveis.exe"
please anyone can advice me?