Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2006-01-06 : 15:03:57
|
Hey Guys -I'm on this project that requires me to INSERT records from a SQL tbl into a Lotus Notes table/form.On my scenario, the Notes Server is a Linked Server (A) to my SQL Server (B) and since it's my first time dealing with Iserts into notes, I'm not really sure how to attack. I saw on the help file the syntax used by NotesSQL (ODBC Drver) is slightly different from our SQL, but I still working within those parameters.I tried:INSERT INTO tbl_Notes (Field1, Field2, Field3, Field4)SELECT (Field1, Field2, Field3, Field4)FROM SQL_DB.dbo.SQL_TableDoesn't work.Error Message:[Lotus][ODBC Lotus Notes]Right parenthesis missingBut if I run:insert into tbl_Notes (Field1, Field2, Field3) values ('TestValue1', 'TestValue2', 'TestValue3')The test records populate on the notes table succuesfully.I know that many if not all of you guys don't work on a MS SQL/ Lotus Notes inviroment, but any help is appreciated.Thanks in advance!---Thanks!Igor. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-06 : 15:07:15
|
I've never seen parenthesis around the columns in the SELECT.Try this:INSERT INTO tbl_Notes (Field1, Field2, Field3, Field4)SELECT Field1, Field2, Field3, Field4FROM SQL_DB.dbo.SQL_TableTara Kizeraka tduggan |
 |
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2006-01-06 : 15:19:39
|
Tara, thanks for your reply.I get:[Lotus][ODBC Lotus Notes] Syntax error or access violation.---Thanks!Igor. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-06 : 15:29:50
|
Are you sure that this is the exact query that is working:insert into tbl_Notes (Field1, Field2, Field3) values ('TestValue1', 'TestValue2', 'TestValue3')You aren't even referring to the linked server in it.Tara Kizeraka tduggan |
 |
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2006-01-06 : 15:36:32
|
Yeah Tara, I forgot to say that when I run this code "insert into tbl_Notes (Field1, Field2, Field3) values ('TestValue1', 'TestValue2', 'TestValue3')" this one runs directly on the connection that I created thru ODBC. The same for the other code... Yeah, consfused you...---Thanks!Igor. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-06 : 15:40:33
|
So you have so far not been able to insert any data via a linked server to Notes? If not, then I'd suspect it has to do with not using the proper name for the tbl_Notes table. Where you have tbl_Notes, you'll have to figure out what the proper naming convention is. For SQL Server, it would be: LinkedServerName.DbName.OwnerName.ObjectName. I've seen for other data source types like this: LinkedServerName...ObjectName or some variation of it using 4 part naming convention.Tara Kizeraka tduggan |
 |
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2006-01-10 : 16:57:03
|
Tried everything I can, apparently this is the way IBM set it up. We'll make use of what they call LEI (Lotus Enterprise Integrator) that apparently allow MS SQL to talk with Notes properly.Wish me luck!Edit: We got togheter with Lotus Notes Developers and they setup data transfers between LN and SQL, it works perfectly, it's a beautiful thing...---Thanks!Igor. |
 |
|
|
|
|
|
|