List:MySQL ODBC« Previous MessageNext Message »
From:Pat Sherrill Date:December 4 1999 12:52pm
Subject:Re: Problems trying to connect via myODBC
View as plain text  
Chuck,

IO channels for BBX are wonderful for BBX, not so wonderful for anything
else.

Try creating a link table to your MyODBC database and DSN through Access.
Then use that DSN to attach.

Let me know if this doesn't work.

Good Luck.

Pat...

----- Original Message -----
From: Charles Lavin <celavin@stripped>
To: <myodbc@stripped>
Sent: Saturday, December 04, 1999 12:30 AM
Subject: Problems trying to connect via myODBC


> Hi --
>
> We are having problems trying to connect to our mySQL server via myODBC
and
> BASIS VPRO/5. The biggest problem I have right now is that I don't know
> where to go for documentation and/or help.
>
> We have a functioning mySQL server on a Linux box. I've installed the
myODBC
> driver on my NT4 workstation (SP4 or maybe SP5; I'm not sure). I have a
> BASIS Visual PRO/5 interpreter (a Business BASIC language) also running on
> the NT box; VPRO/5 is correctly configured for SQL and ODBC support.
>
> We created a mySQL data source on the NT box, and set the server name,
user
> & password, etc.
>
> We've verified that the mySQL server has all the correct permissions for
the
> user and host we're using as the ODBC client.
>
> I can open this mySQL database through the NT4 and myODBC using Excel 97
by
> simply selecting that DSN in the "Get External Data" Excel 97 dialogs.
With
> practically no effort, I can import the data from our test tables in mySQL
> into Excel.
>
> When I try to open that same DSN from VPRO/5, however, the SQL.LOG trace
> seems to indicate that the ODBC driver is being rejected because of a
> permissions problem. This is where we start to really get confused.
>
> I purposely placed all information, including user ID and password, into
the
> myODBC dialog when setting up that data source. I didn't want to have to
> figure out how to pass parameters between VPRO/5 and the ODBC driver if I
> could avoid it.
>
> I can open the data source from Excel just by clicking on the DSN. Excel
> then pops up the mySQL dialog, with all the parameters already there -- so
I
> know they are being stored correctly.
>
> The basic syntax in VPRO/5 to open a SQL data source via ODBC is
>
> SQLOPEN (channel_number) DSN_NAME$
>
> So we used
>
> SQLOPEN (1) "myODBCtrade"
>
> VPRO/5 returns an internal FILE NOT FOUND error along with an external
error
> indicating that the "outside" component refused the connection. The
SQL.LOG
> indicates that access by chuck@stripped has been denied.
>
> The writeup for the VPRO/5 SQLOPEN verb is attached to the bottom of this
> message. We have tried using alternate forms of this verb, such as
>
> SQLOPEN (1,mode="UID=chuck,PWD=chuck") "myODBCtrade"
>
> and have tried the SQLDriverConnect and ExecDirect options mentioned
below.
> None have allowed us to connect to the data source. (The SQLDriverConnect
> option actually returned a whole slew of other errors).
>
> My biggest problem is the notation in the SQLOPEN writeup about options
> passed via SQLOPEN being "driver specific." I have no list of driver
options
> for myODBC; where do I go to find this information? Is there a HOWTO or
> similar doc that would help us troubleshoot this? Why can I open the
> datasource in Excel, but be denied access through VPRO/5?
>
> Any help would be appreciated.
>
> Thanks,
> CL
>
>
> EXCERPT FROM THE VPRO/5 ONLINE MANUAL
>
>
> SQLOPEN Verb - Open SQL Channel
>
> Syntax
>
> SQLOPEN(sqlchan{,MODE=str}{,ERR=lineref})data_source_name_string
>
> Description
>
> The SQLOPEN verb associates sqlchan with an SQL database. The channels
> associated with SQL operations are distinct
> from the regular I/O channels and do not work in FID(), FIN(), and other
> functions that are designed to report on standard
> I/O channels. Also, SQLOPEN does not accept an sqlchan value of 0. When a
> data source requires more than UID and
> PWD as data source keywords, the keywords can be passed in the
> data_source_name string. This mode must follow the
> DSN keyword. All other keywords are driver specific. Some examples
include:
>
> · SQLOPEN(1)"datasource"
>
> · SQLOPEN(1,mode="UID=me,PWD=you")"datasource"
>
> · SQLOPEN(1,mode="SQLDirectConnect")"datasource"
>
> ·
SQLOPEN(1,mode="ExecDirect=1")"DSN=datasource;UID=me,PWD=you;OPTION=value"
>
>
> · SQLOPEN(1)"DSN=datasource"
>
> The MODE= option allows certain parameters to be set. These include:
>
>  UID=string
>             This option supplies a user name to use with the current data
> source.
>  PWD=string
>             This option supplies a password to use with the user name set
by
> the UID mode.
>
>  Not all data sources require a UID or PWD.
>
>  DSN=datasource
>                  This option supplies a data source name.
>  SQLDriverConnect
>                  By default, PRO/5 uses the ODBC SQLConnect function to
> connect to a datasource. This mode
>                  specifies that SQLDriverConnect is to be used instead.
Not
> all drivers support SQLDriverConnect,
>                  and it should not be used to connect to a driver
directly.
> Always specify the datasource name when
>                  using SQLDriverConnect.
>  ExecDirect=1
>                  This mode may be required with certain ODBC drivers. A
> common symptom is a repeated text
>                  string in all fields. If this problem occurs, contact the
> ODBC driver's manufacturer for an update.
>                  This mode replaces the ODBC SQLExecute function with
> SQLExecDirect and slows performance
>                  of PRO/5 in conjunction with this driver.
>
>
> Examples
>
> 1010 LET LIST$=SQLLIST(0),LISTPOS=1,GOODLIST$=""
>
> 1020 WHILE LISTPOS<LEN(LIST$)
>
> 1030 LET
OS($0A$=LIST$(LISTPOS),ENTRY$=ENTRY$( 
> 
> 1030:LISTPOS,P-1),LISTPOS=LISTPOS+P+1 
> 
> 1040 SQLOPEN(1,ERR=1050)ENTRY$; SQLCLOSE(1); 
> 
> 1040:GOODLIST$=GOODLIST$+ENTRY$+$0A$ 
> 
> 1050 WEND 
> 
> 1000 SQLOPEN(1,MODE="UID=Frank,PWD=8JU7B")"Chile Company

>
> 1000:Data"
>
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail myodbc-thread966@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail myodbc-unsubscribe@stripped instead.

Thread
Problems trying to connect via myODBCCharles Lavin4 Dec
  • Re: Problems trying to connect via myODBCPat Sherrill4 Dec