I seem to run into trouble at this line:
Code:
Dim connection As New System.Data.SqlServerCe.SqlCeConnection("Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Users\Blake\Documents\Visual Studio 2008\Projects\Ori\Ori\Database1.sdf")
Code as a whole:
Code:
Dim connection As New System.Data.SqlServerCe.SqlCeConnection("Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Users\Blake\Documents\Visual Studio 2008\Projects\Ori\Ori\Database1.sdf")
Dim command As New System.Data.SqlServerCe.SqlCeCommand("SELECT Price, Quest Item, Name FROM Items", connection)
connection.Open()
Dim reader As System.Data.SqlServerCe.SqlCeDataReader = command.ExecuteReader()
While reader.Read()
MessageBox.Show(String.Format("There are {0} {1} of {2} remaining in stock.", _
reader("Quantity"), _
reader("Unit"), _
reader("Name")))
End While
reader.Close()
connection.Close()