Hi,
I get an error when I follow the above link.
Thanks,
Bonnie
Main Topics
Browse All TopicsHello,
I am trying to query a Progress Database using the 2005 SQL Server Management Studio Express.
Here is what I put in the query analyzer:
Dim ODBCConnection As New Microsoft.Data.Odbc.OdbcCo
ODBCConnection.ConnectionS
"SERVER=Server1;" & _
"UID=reports;PWD=reports;"
ODBCConnection.Open()
Select * from PUB.arCustomer
ODBCConnection.Close()
and I get the errors:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'As'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '.'.
I have never tried this before and cannot get it to work. Do I create this as a stored procedure? Any ideas?
Thanks,
Bonnie
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This excerpt is taken directly from the above link:
There are two ways to add linked servers:
A. Using Object Explorer
1. Setup an ODBC connection to the Progress Database in the ODBC
Administrator in the System DSN. Make sure the connection successfully
establishes.
2. Bring up SQL server 2005 Management Studio, connect to Object explorer. Under Server Objects -> Linked Servers, Right click -> New
3. Provide the information to Following options
Linked server - Provide the name you will use to refer to this linked server.
Server Type - Select Other data source as server type. Clicking this option activates the options below it.
Provider - Microsoft OLE DB provider for ODBC driver.
Product name - it could be anything but better to use progress since it is a progress database.
Data source - ODBC System DSN name The rest of the options can be left blank
4. Go to the Security tab, choose the radio button associated with
"Be made using this security context" and enter the "Remote login" and "With password" of the progress SQL92 user as supplied in the ODBC DSN.
5. Click OK
B. Using sp_addlinkedserver system stored procedures
Typical statements to add linked server. "JIM" is the linked server.
EXEC master.dbo.sp_addlinkedser
@srvproduct=N'Progress', @provider=N'MSDASQL', @datasrc=N'jim',
@provstr=N'MSDASQL'
GO
EXEC master.dbo.sp_serveroption
compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
@optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption
name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption
validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption
timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption
collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption
timeout', @optvalue=N'900'
Go
Notes:
Objects linked servers can be referenced in Transact-SQL statements using four-part names. For example, if a lserver name of DeptSQLSrvr is defined against another instance of SQL Server 2005, the following statement references a table on that server:
OK, Again - More content taken directly from that link you were unable to view You'll use OpenQuery() to do that.
Use OpenQuery() function to query Progress Database on the SQL Server as the following syntax:
SELECT [*] | [fieldname], ["field-name"] FROM OpenQuery([LINKEDSERVERNAM
SELECT [*] | [fieldname], ["field-name"] FROM OpenQuery([LINKEDSERVERNAM
[fieldname] | ["field-name"] = 123 | ''one''')
The following examples are used with sports2000 database:
-- This example will show all the fields records of the customer table from the sports2000 database:
SELECT * FROM OpenQuery([sqlsport2k], 'SELECT * FROM PUB.customer')
-- This example will show records available pertaining to Massachusetts from the state table of sports2000 database:
SELECT * FROM OpenQuery([sqlsport2k], 'SELECT * FROM PUB.state WHERE state = ''MA''')
-- This example will show custnum and name fields records of the customer table from the sports sports2000 database:
SELECT * FROM OpenQuery([sqlsport2k], 'SELECT custnum, name FROM PUB.customer')
-- This example will show name field records of the customer table from the sports2000 database:
SELECT name FROM OpenQuery([sqlsport2k], 'SELECT custnum, name FROM PUB.customer')
Notes:
If the field in the WHERE clause is character, you need to use two sets of single quotes around the string value. On the above example, the string value *one* is wrapped with two sets of SINGLE quotes instead of one sets of double quotes. The last single quote is the closing single quote of the SELECT query inside the OpenQuery() function. The pipe (|) is denoted for OR or option. The example shows that if the table or field names include the dashes (-), you need to add double quotes around it. References to Written Documentation:
http://msdn2.microsoft.com
http://support.microsoft.c
Business Accounts
Answer for Membership
by: gohordPosted on 2009-11-03 at 07:36:34ID: 25729949
Try creating a linked server to the Progress database:
/esprogres s/jsp/Answ erControls .jsp? direc tSolutionL ink=1&tabs =true&docP ropValue=p 120484
http://progress.atgnow.com