Clive, if they are two singles, then what combines the two text statements?
Shouldn't there be a + between 'SCONNECT'';Driver=....'
This is what I am seeing base on the command line...
SET VAR vConnect TEXT = +
'SCONNECT '';DRIVER={MYOB_ODBC_AU7}; TYPE=MYOB; UID=Administrator'
Why not keep the command SCONNECT separate from the connection information.
Have you tried...
SET VAR vConnect = (';DRIVER={MYOB_ODBC_AU7};TYPE=MYOB;UID=Administrator')
SET VAR vConnect = (.vConnect + ';PWD;
DATABASE=C:\AllWork\Premier11\Clearwtr.myo')
SET VAR vConnect = (.vConnect + ';HOST_EXE_PATH=C:\Premier11\MYOBP.exe; +
NETWORK_PROTOCOL=NONET')
SET VAR vConnect = (.vConnect + '; DRIVER_COMPLETION=DRIVER_NOPROMPT')
SET VAR vqte = (CVAL('QUOTES'))
SET VAR vConnect = (.vqte + .vConnect + '; SQL_LOGIN_TIMEOUT=30;' + .vqte)
SCONNECT &vConnect
RETURN
Also, I noticed that one thing was missing...the quotes necessary to be at the
beginning and the end of the command. I noticed from the example given in
RBase, that there are no spaces in the command line. I don't know if that is
significant or not. I would try without spaces to begin with.
I am not that familar with the connection requirements for SQL Servers. I use
the DSN-Less connection all the time to attach to Access and remove data. I
had to make sure that the commnad was exactly like the example or it did not
work. This is the command as listed in the examples from RBase. I did not see
the "Server=" listed in the command.
SCONNECT ';driver={SQL Server};server=corpseadb0d;uid=my_user_name;pwd=my_pw;database=JohnDoe;'
Have you tried just these parameters for the DSN-Less connection process?
Gary
----- Original Message ----
From: Clive Williams <[EMAIL PROTECTED]>
To: RBASE-L Mailing List <[email protected]>
Sent: Monday, May 12, 2008 6:20:56 PM
Subject: [RBASE-L] - Re: ODBC problems V8 connecting to MYOB continuing
G’day Gary,
Thanks for your reply, the ‘’ are two single ‘ – see my reply to Mike.
Regards
Clive Williams
CRW Services
53 Gibson Street
Silverdale NSW 2752
Mobile: 0418 657 833
A H: (02) 4774 0868
email: [EMAIL PROTECTED]
MYOB Certified Consultant
Ostendo Consulting Partner
MYOB Accredited Trainer
Cert IV Workplace Training & Assessment
From:[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gary Wendike
Sent: Tuesday, 13 May 2008 01:01
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: ODBC problems V8 connecting to MYOB continuing
Clive, this may be just a typo from below...
'SCONNECT '';DRIVER={MYOB_ODBC_AU7}; TYPE=MYOB; UID=Administrator'
After the SCONNECT it shouldnt it show ' not ".
Gary
----- Original Message ----
From: Clive Williams <[EMAIL PROTECTED]>
To: RBASE-L Mailing List <[email protected]>
Sent: Monday, May 12, 2008 2:02:22 AM
Subject: [RBASE-L] - ODBC problems V8 connecting to MYOB continuing
G'day,
I am, despite Mike Byerley's kind help, still unable to connect to a MYOB
datafile (only tried on Australian version). I have established a System
DSN for the MYOB sample file clearwtr.myo and can use that to extract data
to both Excel and Access 2007 with no difficulty - there are no restrictions
on the MYOB ODBC drivers and the clearwtr test file. Using RRBYW14 I have
gone to Utilities>Connect SQL Data Source, clicked on the Machine Data
Source tab and then on the appropriate system DSN. When I go to
Utilities>Attach SQL Database Tables I am presented with the Attach Table(s)
dialog box. Selecting a table and then clicking Attach does nothing - the
dialog window remains open. I am running R:Base V8.0.17.30509 on a Toshiba
Tecra with 2GB of RAM and an Intel Centrino duo processor under Windows
Vista Business. It doesn't matter if I have UAC on or off.
I tried Mike's suggestion on a DSN less connection and when I try that using
a test database with just 1 table defined using:-
--ConnectCRWS
--Test connection string for DSNless connection to clearwtr.myo
--Last updated by Clive Williams 12 May 08
CLEAR VAR vConnect
SET VAR vConnect TEXT = +
'SCONNECT '';DRIVER={MYOB_ODBC_AU7}; TYPE=MYOB; UID=Administrator'
SET VAR vConnect = +
(.vConnect + '; PWD; DATABASE=C:\AllWork\Premier11\Clearwtr.myo')
SET VAR vConnect = +
(.vConnect + '; HOST_EXE_PATH=C:\Premier11\MYOBP.exe;
NETWORK_PROTOCOL=NONET')
SET VAR vConnect = +
(.vConnect + '; DRIVER_COMPLETION=DRIVER_NOPROMPT')
SET VAR vConnect = +
(.vConnect + '; SQL_LOGIN_TIMEOUT=30;')
&vConnect
RETURN
Running this command file at the R> prompt results in the message:-
-ERROR- Error message from server: [MYOB ODBC] Connection exception -
Connection does not exist (2957)
The commands are taken from Mike's advice and the MYOB ODBC documentation.
The MYOB file referred to is the sample one that is supplied with MYOB and
all tables are accessible via ODBC and not restricted as are non-registered
files. I also have my own MTOB file that is registered for ODBC and can
extract the same data to both Excel & Access.
Can anyone suggest how I can establish a connection that enables me to
extract the same data I can easily extract via the M$ products. I did note
that when a table was extracted to Access the table name showed as
MYOB_Customers although it showed as MYOB.Customers on the Attach Tables
screen.
The project is for one of the largest freight companies in Australia who are
looking at the extraction of MYOB invoices from clients datafiles and
importing the data with additional formatting into a SAP database. Quite
sensibly, they have a prohibition on Access within their organisation (the
only time I have used it is to see if I could do the data extraction to that
system), so extracting to Access then going from Access to R:Base is not an
option.
Regards
Clive Williams
CRW Services
53 Gibson Street
Silverdale NSW 2752
Mobile: 0418 657 833
A H: (02) 4774 0868
email: [EMAIL PROTECTED]
MYOB Certified Consultant
Ostendo Consulting Partner
MYOB Accredited Trainer
Cert IV Workplace Training & Assessment
__________ Information from ESET Smart Security, version of virus signature
database 3092 (20080512) __________
The message was checked by ESET Smart Security.
http://www.eset.com