Q
Problem solve Get help with specific problems with your technologies, process and projects.

Problem with Paradox Connection String

I have a problem with Paradox. I saw that you had a Connection String and the connection works fine but when I want to do a SQL query on the database it return the following error:
Unexpected error from external database driver (11270). Here is the code I used:
Dim tempCn As New ADODB.Connection
tempCn.Open("Driver={Microsoft Paradox Driver (*.db )};" & _
          "DriverID=538;" & _
          "Fil=Paradox 5.X;" & _
          "DefaultDir=" & FilePath & ";" & _
          "Dbq=" & FilePath & ";" & _
          "CollatingSequence=ASCII")
dim lrs as adodb.recordset
This all works fine but I get the error on the following line:
lrs.Open("Select * from MyTest" , tempCn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly). Can you give me any help?
Platform: Visual Studio 2003. Windows XP Professional
You should be using ADO.NET to connect to it, and the OleDbConnection object, instead of the legacy ADODB objects. Check out this previous answer: https://searchwindevelopment.techtarget.com/answer/Making-a-connection-to-a-Paradox-database

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close