dbTalk Databases Forums  

Cannot connect to SQLAnywhere 11.0.1.2044 through VB macro

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Cannot connect to SQLAnywhere 11.0.1.2044 through VB macro in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark
 
Posts: n/a

Default Cannot connect to SQLAnywhere 11.0.1.2044 through VB macro - 09-09-2009 , 06:35 AM






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.

Reply With Quote
  #2  
Old   
Chis Keating (Sybase iAnywhere)
 
Posts: n/a

Default Re: Cannot connect to SQLAnywhere 11.0.1.2044 through VB macro - 09-09-2009 , 08:41 AM






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:
Quote:
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.

Reply With Quote
  #3  
Old   
Mark
 
Posts: n/a

Default Re: Cannot connect to SQLAnywhere 11.0.1.2044 through VB macro - 09-10-2009 , 08:41 AM



Chris, you're a genius...thanks for your help and info...

Quote:
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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.