السلام عليكم
عندي الكود التالي عند تنفيذه يحدث الخطأ التالي
.اقتباسAn unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsApplication10.exeAdditional information: [Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cnn As New ADODB.Connection
Dim dbf_name As String
Dim dbf_path As String
Dim rs As New ADODB.Recordset
dbf_path = "C:\Program Files\Spatially Aware\Map Suite Winforms Evaluation Edition\SampleData\USA\Austin\austinstreets.shp"
dbf_name = "C:\Program Files\Spatially Aware\Map Suite Winforms Evaluation Edition\SampleData\USA\Austin\austinstreets.dbf"
cnn.Open("Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=" & dbf_path)
rs.Open(dbf_name, cnn)
DataGrid1.DataSource = rs
DataGrid1.Refresh()
End Sub
End Classيمكن أن يكون الخطأ بسبب عدم تعريف odbc بالشكل الصحيح هل يمكن أن أعرف كيف يتم تعريفه؟؟
شكرا لكم
