HighTechTalks DotNet Forums  

Re: Help

Dotnet Framework (ODBC.net) microsoft.public.dotnet.framework.odbcnet


Discuss Re: Help in the Dotnet Framework (ODBC.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Paul Clement
 
Posts: n/a

Default Re: Help - 02-22-2005 , 09:03 AM






On Mon, 21 Feb 2005 10:51:03 -0500, "Test" <prueba (AT) mpcfg (DOT) co.cu> wrote:

¤ Hi
¤
¤ I can not connect to a paradox database. Please how I can do it using ODBC.
¤ net?

Try using Jet OLEDB:

Dim sConnectionString As String

sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=E:\My Documents\Paradox;Extended Properties=Paradox 5.x;"
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionStrin g)
objConn.Open()

'Use file name without extension
Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * from ParadoxFile", objConn)

Dim ds As New DataSet

da.Fill(ds, "ParadoxTable")

DataGrid1.SetDataBinding(ds, "ParadoxTable")

Dim dt As DataTable
dt = ds.Tables("ParadoxTable")

Dim drCurrent As DataRow
For Each drCurrent In dt.Rows
Console.WriteLine("{0} {1}", _
drCurrent("Col1").ToString, _
drCurrent("Col2").ToString)
Next

objConn.Close()


Paul ~~~ pclement (AT) ameritech (DOT) net
Microsoft MVP (Visual Basic)

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.