February 9th, 2004, 12:18 PM
SQL Server -> AS/400
Guys, I have a question. I'm trying to connect to an AS/400 using the following script
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?
IF OBJECT_ID('Select * from systables where name LIKE 'ServerName') <> 0
EXEC sp_droplinkedsrvlogin 'ServerName', NULL
EXEC sp_dropserver 'ServerName'
@server = 'ServerName',
@srvproduct = 'Client Access ODBC Driver (32-bit)',
@provider = 'IBMDA400',
@datasrc = 'LibraryName', --Absolute path excluding filename
@provstr = ''
EXEC sp_addlinkedsrvlogin 'ServerName', false, NULL, 'UserName', 'Password'
Exec sp_helpserver 'ServerName'
"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
February 9th, 2004, 09:03 PM