![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all...we recently migrated to SQLAnywhere 11.0.1.2044 with minimal problems. The one problem we are having though, is that we are having trouble connecting to SQLAnywhere 11 through a VB WORD macro. The connection string info is as follows: strConnection = "DSN=Disability_TEST_09;UID='';PWD='';DATABASE=Dis ability_TEST_09" strName = "\\svrper10\ASA_09\Disability_TEST_09\Disability_T est_09.db" ActiveDocument.MailMerge.OpenDataSource Name:=strName, _ Connection:=strConnection, SQLStatement:="Select * from dis_voucher_joint" . . . We continually get the runtime error: ODBC error: [Sybase][ODBC Driver][SQL Anywhere]Parse error: Invalid or missing keyword near 'DATABASE' Sql State: 08004 Return Code: SQL_ERROR Any clue as to what is cause this? It worked fine in ASA 9.0.2.2451. Any info would be greatly appreciated. |
#3
| |||
| |||
|
|
This may be related to Engineering Case 574746 which is fixed in 11.0.0 build 1624 or later. Try changing the DATABASE parm to DatabaseName (or removing that completely). I suspect that the following should work provided that the DSN can connect to the database (using the Test Connection button): strConnection ="DSN=Disability_TEST_09" You should also be aware that we don't recommend accessing a database via a netware share (in your case an UNC reference). I am not sure that you are specifically doing that but your strName is suspect. Here is a techdoc on that topic for reference: http://www.sybase.com/detail?id=1034790 -chris Mark wrote: Hello all...we recently migrated to SQLAnywhere 11.0.1.2044 with minimal problems. The one problem we are having though, is that we are having trouble connecting to SQLAnywhere 11 through a VB WORD macro. The connection string info is as follows: strConnection = "DSN=Disability_TEST_09;UID='';PWD='' ;DATABASE=Disability_TEST_09" strName = "\\svrper10\ASA_09\Disability_TEST_09\Disability_T est_09.d b" ActiveDocument.MailMerge.OpenDataSource Name:=strName, _ Connection:=strConnection, SQLStatement:="Select * from dis_voucher_joint" . . . We continually get the runtime error: ODBC error: [Sybase][ODBC Driver][SQL Anywhere]Parse error: Invalid or missing keyword near 'DATABASE' Sql State: 08004 Return Code: SQL_ERROR Any clue as to what is cause this? It worked fine in ASA 9.0.2.2451. Any info would be greatly appreciated. |
![]() |
| Thread Tools | |
| Display Modes | |
| |