Re: Cincom vw7.5nc ODBC to MS Access



On Mar 7, 2:55 am, Terry Raymond <traymond-nospam-at-craftedsmalltalk-
dot-com> wrote:
gargoyle47 <gjdcat...@xxxxxxxxxxx> wrote in news:2f17649b-fb83-44e2-a6a3-
68ec90005...@xxxxxxxxxxxxxxxxxxxxxxxxxxx:

Need help with using Smalltalk with MS Access 2003 via ODBC.

I am relatively new to Smalltalk and am experimenting on my home PC
with Cincom vw7.5nc.

I have Access 2003 installed and would like to set up an ODBC but
cannot find any environment variable specifying an ODBC DSN. Nor do I
know how to go about setting up an ODBC DSN for use with Smalltalk and
Access.

Can anybody point me in the right direction?

Set up the DSN just like any other ODBC DSN.
Then you sent the connection environment to the DSN name
when you connect.

--
Terry

Hi Terry

My PC has an ODBC connection defined:
an ODBCDataSource( DSN ='MS Access Database', Description =
'Microsoft Access Driver (*.mdb)' )
which I obtained via
connection := ODBCConnection new.
connection dataSources

I've been following the instructions in the documentation in the
VisualWorks Database Application Developer's Guide (http://
www.cincomsmalltalk.com/documentation/current/DatabaseAppDevGuide.pdf).

On page 15 it refers to Environment Strings, specifically database
environment
string, which isn't set on my system and I don't knwo what it should
be set as/to.

Secondly, following the info on page 146, it says
connection := ODBCConnection new.
connection environment: 'DRIVER={SQL
Server};Database=dbname;UID=username;PWD=password;SERVER=servername;'.
connection connect.

which I've modified for my system to
connection := ODBCConnection new.
connection environment: 'DRIVER={Microsoft Access Driver
(*.mdb)};Database=C:\PROGRA~1\Cincom\vw7.5nc\image
\db1.mdb;UID=myusr;PWD=mypswd;SERVER=ODBC;'.
connection connect.

which generates an exception saying:-
Unhandled exception: [Microsoft][ODBC Microsoft Access Driver]Invalid
connection string attribute Database
[] in ODBCConnection>>acquireExternal:
BlockClosure>>ifCurtailed:
ODBCConnection>>acquireExternal:
ODBCConnection(ExternalDatabaseConnection)>>acquire:

this suggests to me that "Database" is an invalid component in the
connection string.

At this point I'm stumped.
.



Relevant Pages

  • Re: Ada DB bindings and APQ
    ... The database client "interface" from an object perspective ... Environment ... The connection ... This is why they began as separate ...
    (comp.lang.ada)
  • Problem with ODBC Connection from GUI
    ... I've written a small GUI application that connects to an ODBC DSN and ... retrieves data from the specified database. ... "Failed to connect to database using this connection string: ...
    (comp.lang.java.programmer)
  • Re: Cincom vw7.5nc ODBC to MS Access
    ... dot-com> wrote: ... cannot find any environment variable specifying an ODBC DSN. ... Then you sent the connection environment to the DSN name ...
    (comp.lang.smalltalk)
  • Re: Cincom vw7.5nc ODBC to MS Access
    ... cannot find any environment variable specifying an ODBC DSN. ... Then you sent the connection environment to the DSN name ... self connection password: password value. ...
    (comp.lang.smalltalk)
  • Re: System.Data.SqlClient.SqlException: General network error. Check your network documentation.
    ... the database being stopped, or deleted, or something along those lines. ... > System.Data.SqlClient.SqlException: General network error. ... > error today in my production environment, beta environment, ... > app is trying to open a connection using integrated security. ...
    (microsoft.public.dotnet.framework.aspnet)