E
Enver A
*The code is below. It always stuck on line "command4.ExecuteNonQuery()" and
it throws an Sqlce exception
Under Public Class Form1 definition:
Private Const filename4 As String = "MUSTERI.SDF"
Private connstr4 As String = String.Format("Datasource={0};Password={1}",
filename4, "Admin")
Private connection4 As SqlCeConnection
Under Private sub CreateDB Click():
Dim engine4 As New SqlCeEngine(connstr4)
If Not File.Exists(filename4) Then
engine4.CreateDatabase()
Else
MsgBox("FILE EXISTS")
End If
engine4.Dispose()
connection4 = New SqlCeConnection(connstr4)
connection4.Open()
Dim command4 As SqlCeCommand = connection4.CreateCommand
command4.CommandText = "CREATE TABLE MUSTERI (INDEXMS nvarchar(5),MSAD
nvarchar(30),MSSOYAD nvarchar(30),MSSEMT nvarchar(30),MSSEMTRCH
nvarchar(30),MSTLF nvarchar(15),FIYAT nvarchar(3),INDEXBY
nvarchar(4),VHMARKA nvarchar(30),VHMODEL nvarchar(50),VHLSEBAT
nvarchar(20),VHYIL nvarchar(4),LASONMRK nvarchar(20),LASONDSN
nvarchar(30),LASRKMRK nvarchar(20),LASRKDSN nvarchar(30),VHDSSGON
nvarchar(10),VHDSSGRK nvarchar(10),VHDSSLON nvarchar(10),VHDISSLRK
nvarchar(10),VHPLAKA nvarchar(15),VHIDHVON nvarchar(3),VHIDHVRK
nvarchar(3),TARIH nvarchar(10),USER nvarchar(5))"
command4.ExecuteNonQuery()
command4.Dispose()
MsgBox("MUSTERI.SDF TAMAM")
' 4TH Creation Complete
connection4.Close()
it throws an Sqlce exception
Under Public Class Form1 definition:
Private Const filename4 As String = "MUSTERI.SDF"
Private connstr4 As String = String.Format("Datasource={0};Password={1}",
filename4, "Admin")
Private connection4 As SqlCeConnection
Under Private sub CreateDB Click():
Dim engine4 As New SqlCeEngine(connstr4)
If Not File.Exists(filename4) Then
engine4.CreateDatabase()
Else
MsgBox("FILE EXISTS")
End If
engine4.Dispose()
connection4 = New SqlCeConnection(connstr4)
connection4.Open()
Dim command4 As SqlCeCommand = connection4.CreateCommand
command4.CommandText = "CREATE TABLE MUSTERI (INDEXMS nvarchar(5),MSAD
nvarchar(30),MSSOYAD nvarchar(30),MSSEMT nvarchar(30),MSSEMTRCH
nvarchar(30),MSTLF nvarchar(15),FIYAT nvarchar(3),INDEXBY
nvarchar(4),VHMARKA nvarchar(30),VHMODEL nvarchar(50),VHLSEBAT
nvarchar(20),VHYIL nvarchar(4),LASONMRK nvarchar(20),LASONDSN
nvarchar(30),LASRKMRK nvarchar(20),LASRKDSN nvarchar(30),VHDSSGON
nvarchar(10),VHDSSGRK nvarchar(10),VHDSSLON nvarchar(10),VHDISSLRK
nvarchar(10),VHPLAKA nvarchar(15),VHIDHVON nvarchar(3),VHIDHVRK
nvarchar(3),TARIH nvarchar(10),USER nvarchar(5))"
command4.ExecuteNonQuery()
command4.Dispose()
MsgBox("MUSTERI.SDF TAMAM")
' 4TH Creation Complete
connection4.Close()