[.NET]vb2005與sql server 2005連結

看板Visual_Basic作者 (小旭)時間18年前 (2007/08/28 12:08), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
請問一下,我是要把db放到pda上去,做是的行動裝置的東西。 我在sql server mobile上建立資料庫是.sdf檔,之後就按照vb2005上的指示 在伺服器總管那設定資料連接後 在模擬器上加入DataGrid控制項後,之後再從Datasource去連db, 結果執行後出現了以下的問題…(其中一段的程式碼) <System.Diagnostics.DebuggerNonUserCodeAttribute(), _ System.ComponentModel.DataObjectMethodAttribute (System.ComponentModel.DataObjectMethodType.Fill, true)> _ Public Overloads Overridable Function Fill (ByVal dataTable As ART_DBDataSet.ObjectDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable)<<<<問題所在 Return returnValue End Function 它出現了路徑無效。請檢查資料庫的目錄。 [ Path = C:\SQLMobileDb\ART_DB.sdf ] 想請問一下,為何連不上資料庫?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 192.192.154.52

08/28 12:48, , 1F
先確認你.sdf的位置,放在PC上還是PDA上
08/28 12:48, 1F

08/28 14:02, , 2F
放在pc上,用vb2005的pda模擬器來開啟
08/28 14:02, 2F
文章代碼(AID): #16qv-Wj0 (Visual_Basic)