I have visual studio 2008 pro installed along with a sql server 2008 sql server 2005 mobile. I have installed service packs for
the data base file wont open on my computer but it does on the school computers. I don't know what the school computers have on them. The database file along with the code base was provided by the instructor.
when i double click on the database file i get
the operation could not be completed. unspecified error
In server explorer I try to connect the database but the browser only looks for mdf database files not sdf.
the program builds and runs with out errors or exceptions.
some of the code that uses the database file
Imports System.Data.SqlServerCe
Imports System.Security.Cryptography
Imports System.Text
Public Class Form1
Private Sub btnCand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCand1.Click, btnCand2.Click, btnCand3.Click
Dim conn As New SqlCeConnection(My.Settings.Database1ConnectionString)
conn.Open()
Dim sq As SqlCeCommand
sq = New SqlCeCommand("SELECT [when] FROM tblVoters WHERE voterID = @voterID AND passcode = @passcode", conn)
sq.Parameters.Add("@voterID", txtVoterID.Text)
sq.Parameters.Add("@passcode", GetUserHash(txtVoterID.Text, txtPasscode.Text))
Dim result As Object = sq.ExecuteScalar()