J
Joss
Plesae excuse if I make any howlers here, I am on the steep part of the
curve.
I have created a link in SQL to an AS400 but cannot create a view to it in
Access ADP. The SQL that I am using is
'SELECT fieldname FROM as400sver..dbo.linkedTableNAme;
the error that I get when I try to save/view the view is ADO error: line 4:
Incorrect syntax near ';'.
I believe I saw the format with two dots in another post, so assume this may
apply if there is only one database? Anyway, there is only one but I do not
know how to find its name.
The DSN works because I can use it to link to a table from a .MDB.
linked server was made using the following, I added 'EXEC' when it would not
run lines two and three, but the first one gos OK.:
sp_addlinkedserver @server = 'as400sver' , @srvproduct = 'AS400 Client
Access', @provider = 'MSDASQL' , @datasrc = 'AS400SQL', @provstr =
'UID=;PWD=;'
EXEC sp_serveroption @server= 'as400sver' , @optname= 'data access' ,
@optvalue= TRUE
EXEC sp_addlinkedsrvlogin @rmtsrvname = 'as400sver' ,@useself =
true,@rmtuser = '',@rmtpassword = ''
I know that this ran OK, because the output file reads:
(1 row affected)
(1 row affected)
Server added.
(1 row affected)
(0 rows affected)
(1 row affected)
(0 rows affected)
(1 row affected)
Not sure exactly what this means, but 'Server added' seems pretty positive.
Can somebody help me please?
thanks,
Jo
curve.
I have created a link in SQL to an AS400 but cannot create a view to it in
Access ADP. The SQL that I am using is
'SELECT fieldname FROM as400sver..dbo.linkedTableNAme;
the error that I get when I try to save/view the view is ADO error: line 4:
Incorrect syntax near ';'.
I believe I saw the format with two dots in another post, so assume this may
apply if there is only one database? Anyway, there is only one but I do not
know how to find its name.
The DSN works because I can use it to link to a table from a .MDB.
linked server was made using the following, I added 'EXEC' when it would not
run lines two and three, but the first one gos OK.:
sp_addlinkedserver @server = 'as400sver' , @srvproduct = 'AS400 Client
Access', @provider = 'MSDASQL' , @datasrc = 'AS400SQL', @provstr =
'UID=;PWD=;'
EXEC sp_serveroption @server= 'as400sver' , @optname= 'data access' ,
@optvalue= TRUE
EXEC sp_addlinkedsrvlogin @rmtsrvname = 'as400sver' ,@useself =
true,@rmtuser = '',@rmtpassword = ''
I know that this ran OK, because the output file reads:
(1 row affected)
(1 row affected)
Server added.
(1 row affected)
(0 rows affected)
(1 row affected)
(0 rows affected)
(1 row affected)
Not sure exactly what this means, but 'Server added' seems pretty positive.
Can somebody help me please?
thanks,
Jo