read paradox file(.DB)
-
I am writing an application in vb.net 2005 to read, update, and insert data to paradox database file(.db). When I try to connect I get this error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Here is my code:
Dim connectionstring As String = "Driver={Microsoft Paradox Driver(*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=C:\Data Feeds\;Dbq=C:\Data Feeds\;CollatingSequence=ASCII" Dim querystring As String = "SELECT * FROM PriceBooks.DB" Dim tableName As String = "PriceBooks.DB" Dim dataSet As DataSet = New DataSet Using connection As New Odbc.OdbcConnection(connectionstring) Dim adapter As New OdbcDataAdapter() adapter.SelectCommand = New OdbcCommand(querystring, connection) Dim builder As OdbcCommandBuilder = New OdbcCommandBuilder(adapter) connection.Open() adapter.Fill(dataSet, tableName) adapter.Update(dataSet, tableName) Me.DataGridView1.DataSource = dataSet Me.DataGridView1.DataMember = "PriceBooks.DB" End Using
Any ideas on what the problem might be? jds1207 -
I am writing an application in vb.net 2005 to read, update, and insert data to paradox database file(.db). When I try to connect I get this error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Here is my code:
Dim connectionstring As String = "Driver={Microsoft Paradox Driver(*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=C:\Data Feeds\;Dbq=C:\Data Feeds\;CollatingSequence=ASCII" Dim querystring As String = "SELECT * FROM PriceBooks.DB" Dim tableName As String = "PriceBooks.DB" Dim dataSet As DataSet = New DataSet Using connection As New Odbc.OdbcConnection(connectionstring) Dim adapter As New OdbcDataAdapter() adapter.SelectCommand = New OdbcCommand(querystring, connection) Dim builder As OdbcCommandBuilder = New OdbcCommandBuilder(adapter) connection.Open() adapter.Fill(dataSet, tableName) adapter.Update(dataSet, tableName) Me.DataGridView1.DataSource = dataSet Me.DataGridView1.DataMember = "PriceBooks.DB" End Using
Any ideas on what the problem might be? jds1207You might want to tell us on which line the error occurs and you also want to get rid of the ".db" after Pricebooks:
Dim querystring As String = "SELECT * FROM Pricebooks"
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
You might want to tell us on which line the error occurs and you also want to get rid of the ".db" after Pricebooks:
Dim querystring As String = "SELECT * FROM Pricebooks"
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Perhaps the machine doesn't have the Paradox driver installed?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007