×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Accesing Pervasive Tables from MSQL

Accesing Pervasive Tables from MSQL

Accesing Pervasive Tables from MSQL

(OP)
I need to be able to execute queries that use tables from both  Pervasive and Microsoft SQL databases. I have tried connecting to the pervasive database from MSQL using the following:

Select * From openrowset('PervasiveOLEDB','Provider=PervasiveOLEDB;Data Source=Fops;Location=Fops1','Select * From Order_Header') as A

Which returns the error:


Server: Msg 7303, Level 16, State 2, Line 1
Could not initialize data source object of OLE DB provider 'PervasiveOLEDB'.
[OLE/DB provider returned message: Errors occurred]
[OLE/DB provider returned message: Mode, Protection Level, or an unknown parameter has been set (incorrectly) in the connection string

The connection string works fine when used in a Visual Basic program.

Cheers

RE: Accesing Pervasive Tables from MSQL

I don't believe you can use the PervasiveOLEDB provider as part of a linked server in MS SQL.  You should be able to switch to the ODBC driver and it should work.

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician

RE: Accesing Pervasive Tables from MSQL

(OP)
Could you help us out with an example, please. I have Have setup a DSN on the server and tried to use this as the source I still could not get it to work.

RE: Accesing Pervasive Tables from MSQL

You could try:
Select * From openrowset('MSDASQL','Provider=MSDASQL.1;Data Source=Fops','Select * From Order_Header') as A

where the ODBC DSN is named Fops.

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician

RE: Accesing Pervasive Tables from MSQL

(OP)
mirtheil

Thanks for your input finally got query to work using


Select * From openrowset('MSDASQL','Provider=MSDASQL.1;DSN=FOPS1_DSN','Select * From Order_Header') as A

Thank you

RE: Accesing Pervasive Tables from MSQL

Sir
i have betrive database , i have to connect this through vb6.
pls give me code.
& which dsn i have to use.

arun k m

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close