
February 9th, 2004, 11:18 AM
|
 |
Inherits Programmer.Slacker
|
|
Join Date: Aug 2003
Location: Between my Id and your Ego
|
|
|
SQL Server -> AS/400
Guys, I have a question. I'm trying to connect to an AS/400 using the following script
Code:
IF OBJECT_ID('Select * from systables where name LIKE 'ServerName') <> 0
EXEC sp_droplinkedsrvlogin 'ServerName', NULL
EXEC sp_dropserver 'ServerName'
GO
EXEC sp_addlinkedserver
@server = 'ServerName',
@srvproduct = 'Client Access ODBC Driver (32-bit)',
@provider = 'IBMDA400',
@datasrc = 'LibraryName', --Absolute path excluding filename
@provstr = ''
GO
EXEC sp_addlinkedsrvlogin 'ServerName', false, NULL, 'UserName', 'Password'
GO
Exec sp_helpserver 'ServerName'
exec sp_helplogins
Obviously, Names have been changed to protect the innocent  . I know this is wrong, but I can't figure it out. Can someone give me a boost here?
__________________
Fisherman
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein
|