1. Matt's ODBC

Matt, I'm trying to figure out the best way to deal with users and passwords
in my software using your ODBC wrapper. I'm thinking it would best be done 
with your dataSourcesODBC( ) routine if it could also return the user and 
password in addition to the DSN's which is also stored in the same place on XP.
Is this possible, or
does this not make sense? Currently I have "root" and "" hard coded in the 
programs, which I think is not the way it should be done, and certainly not
functional when accessing the DB remotely.

new topic     » topic index » view message » categorize

2. Re: Matt's ODBC

George Walters wrote:
>
> Matt, I'm trying to figure out the best way to deal with users and passwords
> in my software using your ODBC wrapper. I'm thinking it would best be done 
> with your dataSourcesODBC( ) routine if it could also return the user and 
> password in addition to the DSN's which is also stored in the same place on
> XP. Is this possible, or 
> does this not make sense? Currently I have "root" and "" hard coded in the 
> programs, which I think is not the way it should be done, and certainly not
> functional when accessing the DB remotely.

Yes, I think hardcoding like that is the wrong way to go.  I don't think
that users and passwords are stored anywhere that odbc can access it.  The
users and passwords are set on the database itself.  If you wanted, you
could store them yourself locally (encrypted, of course).  

A better way is probably to use openDriverConnectionODBC().  It will have
the ODBC driver prompt the user for his id and password.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: Matt's ODBC

Matt, on settings > control panel > Admin Tools > Data Sources(ODBC) both
MySql and MS Access ( the only DB's on my computer have a login and password
on their config panels. I would like to get the login and password from there.
It seems this would be the place to get them instead of me hacking something
outside of the data base to store that info. Is it possible to get to that 
info by making changes to your wrapper?

new topic     » goto parent     » topic index » view message » categorize

4. Matt's ODBC

This is a multi-part message in MIME format.

------=_NextPart_000_002C_01C2A759.E7761A40
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Running Matt's odbc.exw example, I get a handle from =
"openConnectionODBC()" of  minus 2 (-2). Is this a legitimate handle? If =
I continue it says I've conneced, but any sql statement produces an =
error and the demo blows up..

george

------=_NextPart_000_002C_01C2A759.E7761A40
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Running Matt's odbc.exw example, I get =
a handle=20
from "openConnectionODBC()" of&nbsp; minus 2 (-2). Is this a legitimate =
handle?=20
If I continue it says I've conneced, but any sql statement produces an =
error and=20
the demo blows up..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>george</FONT></DIV>

------=_NextPart_000_002C_01C2A759.E7761A40--

new topic     » goto parent     » topic index » view message » categorize

5. Re: Matt's ODBC

This is a multi-part message in MIME format.

------=_NextPart_000_003B_01C2A761.C0912840
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Jonas,

I'm connecting to mysql....or at least trying to.

----- Original Message -----=20
From: Jonas Temple=20
To: EUforum=20
Sent: Thursday, December 19, 2002 1:04 PM
Subject: RE: Matt's ODBC



George,

What type of DB are you connecting to?

There's one limitation with Matt's ODBC wrapper.  If the ODBC driver=20
requires additional information (Oracle, for example) then you have to=20
use SQLDriverConnect, which Matt's library doesn't support (although he=20
does reference the function, it's just not implemented).

Jonas
George Walters wrote:
> Running Matt's odbc.exw example, I get a handle from=20
> "openConnectionODBC()" of  minus 2 (-2). Is this a legitimate handle? =
If=20
> I continue it says I've conneced, but any sql statement produces an=20
> error and the demo blows up..
>=20
> george
>=20
>=20




------=_NextPart_000_003B_01C2A761.C0912840
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Jonas,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm connecting to mysql....or at least =
trying=20
to.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3Djktemple at yhti.net href=3D"mailto:jktemple at yhti.net">Jonas =
Temple</A> </DIV>
<DIV><B>To:</B> <A title=3DEUforum at topica.com=20
href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV>
<DIV><B>Sent:</B> Thursday, December 19, 2002 1:04 PM</DIV>
<DIV><B>Subject:</B> RE: Matt's ODBC</DIV></DIV>
<DIV><BR></DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing =
List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
<BR><BR>George,<BR><BR>What type of DB are you connecting =
to?<BR><BR>There's one=20
limitation with Matt's ODBC wrapper.&nbsp; If the ODBC driver =
<BR>requires=20
additional information (Oracle, for example) then you have to <BR>use=20
SQLDriverConnect, which Matt's library doesn't support (although he =
<BR>does=20
reference the function, it's just not =
implemented).<BR><BR>Jonas<BR>George=20
Walters wrote:<BR>&gt; Running Matt's odbc.exw example, I get a handle =
from=20
<BR>&gt; "openConnectionODBC()" of&nbsp; minus 2 (-2). Is this a =
legitimate=20
handle? If <BR>&gt; I continue it says I've conneced, but any sql =
statement=20
produces an <BR>&gt; error and the demo blows up..<BR>&gt; <BR>&gt;=20
george<BR>&gt; <BR>&gt;=20
<BR><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>This=20
email was sent to: <A=20
href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A><BR><BR>EASY =
UNSUBSCRIBE=20
click here: <A=20
href=3D"http://topica.com/u/?b1dd66.b2Shsm.Z3dhbHRl">http://topica.com/u/=
?b1dd66.b2Shsm.Z3dhbHRl</A><BR>Or=20
send an email to: <A=20
href=3D"mailto:EUforum-unsubscribe at topica.com">EUforum-unsubscribe@topica=
.com</A><BR><BR>T=20
O P I C A -- Register now to manage your mail!<BR><A=20
href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c=
om/partner/tag02/register</A><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_000_003B_01C2A761.C0912840--

new topic     » goto parent     » topic index » view message » categorize

6. Re: Matt's ODBC

This is a multi-part message in MIME format.

------=_NextPart_000_0046_01C2A788.ECA7B580
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks for the response Matt.

Yes,  I'm running your demo w/o any changes. mysql shows up in the =
window, I highlight it and click "connect"  and it says connected but no =
sql statement works. I looked at the handle returned (hconn) and it is =
-2. Here it is.

-- odbc.exw
-- Matt Lewis
-- demo for odbc.ew

include print.e
include win32lib.ew
include odbc.ew
with trace
without warning


constant
Main =3D create( Window, "ODBC Demo", 0, 20, 20, 600, 500, 0),
DSN =3D create( ListView, {"DSN","Type"}, Main, 10, 20, 400, 250,=20
    LVS_REPORT+LVS_SINGLESEL ),
ConnButton =3D create( PushButton, "Connect", Main, 20, 280, 90, 30, 0),
SQLButton =3D create( PushButton, "Run SQL", Main, 140, 280, 90, 30, 0),
SQLEdit =3D create( MleText, "", Main, 20, 320, 400, 100, 0),
UserEdit =3D create( EditText, "User ID", Main, 250, 280, 90, 25, 0),
AuthEdit =3D create( EditText, "Password", Main, 350, 280, 90, 25, 0),
MaxEdit =3D create( EditText, "-1", Main, 450, 280, 30, 25, 0),
MaxButton =3D create( PushButton, "Set Max", Main, 450, 320, 90, 30, 0)

atom hconn, max_records
sequence query

query =3D {}

procedure connect()
    sequence dsn, user, auth
    integer ok
   =20
    dsn =3D getLVSelectedText( DSN )
    dsn =3D dsn[1]
    if not length(dsn) then
        return
    end if
    user =3D getText( UserEdit )
    auth =3D getText( AuthEdit )
    trace(1)
    hconn =3D openConnectionODBC( dsn, user, auth )
    if not hconn then
        ok =3D message_box( "Connection Failed","ODBC Error", =
MB_ICONERROR)
    else
        ok =3D message_box( "Connected to: " & dsn, "ODBC Connect", =
MB_OK )
    end if
end procedure
onClick[ConnButton] =3D routine_id("connect")

procedure run_query()
    atom fn
    sequence sql
    object data
    trace(1)
    if not hconn then
        return=20
    end if
   =20
    sql =3D getText( SQLEdit )
   =20
    if equal( sql, query ) and hconn !=3D getCurrentHandle() then=20
        fn =3D open( "odbc.txt", "a")
        data =3D getData( 0 )
    else
        query =3D sql
   =20
        data =3D execDirectODBC( hconn, sql )
        --freeHandleODBC( 0 )
        fn =3D open( "odbc.txt", "w")
    end if
   =20
    if sequence( data ) then
   =20
        for i =3D 1 to length( data ) do
            print(fn, data[i]) puts(fn,"\n")
        end for
       =20
        close( fn )
       =20
        if not length( data ) then
           =20
            fn =3D message_box( "No more records to retrieve",=20
                    "ODBC Demo", MB_OK)
            query =3D {}
            freeHandleODBC( 0 )
        else
       =20
            fn =3D message_box( "See odbc.txt for results.",=20
                    "ODBC Demo", MB_OK )
           =20
            if max_records =3D -1 or length(data) < max_records then
                query =3D {}
                freeHandleODBC( 0 )
            end if
           =20
        end if
    else
        odbcError( -data )
    end if
   =20
end procedure
onClick[SQLButton] =3D routine_id( "run_query" )

procedure get_dsn()
    sequence dsn
    integer ok
   =20
   =20
    dsn =3D dataSourcesODBC()
   =20
    for i =3D 1 to length( dsn ) do
        ok =3D addLVItem( DSN, 0, dsn[i])
    end for
end procedure
onOpen[Main] =3D routine_id("get_dsn")

procedure set_max()
    integer max
    max =3D getNumber( MaxEdit )
    if max then
        max_records =3D max
        setMaxRecords( max )
    end if
end procedure
onClick[MaxButton] =3D routine_id("set_max")

initODBC()

WinMain( Main, Normal )


george

----- Original Message -----=20
From: Matthew Lewis=20
To: EUforum=20
Sent: Thursday, December 19, 2002 3:47 PM
Subject: RE: Matt's ODBC



George,

This appears to be the error code, SQL_INVALID_HANDLE.  Did you call
initODBC()?  This must be done in order to set some things up.

Matt Lewis

-----Original Message-----
From: George Walters [mailto:gwalters at sc.rr.com]


Running Matt's odbc.exw example, I get a handle from =
"openConnectionODBC()"
of  minus 2 (-2). Is this a legitimate handle? If I continue it says =
I've
conneced, but any sql statement produces an error and the demo blows =
up..




------=_NextPart_000_0046_01C2A788.ECA7B580
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thanks for the response =
Matt.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Yes,&nbsp; I'm running your demo w/o =
any changes.=20
mysql shows up in the window, I highlight it and click "connect"&nbsp; =
and it=20
says connected but no sql statement works. I looked at the handle =
returned=20
(hconn) and it is -2. Here it is.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-- odbc.exw<BR>-- Matt Lewis<BR>-- demo =
for=20
odbc.ew</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>include print.e<BR>include =
win32lib.ew<BR>include=20
odbc.ew<BR>with trace<BR>without warning</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=3DArial size=3D2>
<DIV><BR>constant<BR>Main =3D create( Window, "ODBC Demo", 0, 20, 20, =
600, 500,=20
0),<BR>DSN =3D create( ListView, {"DSN","Type"}, Main, 10, 20, 400, 250, =

<BR>&nbsp;&nbsp;&nbsp; LVS_REPORT+LVS_SINGLESEL ),<BR>ConnButton =3D =
create(=20
PushButton, "Connect", Main, 20, 280, 90, 30, 0),<BR>SQLButton =3D =
create(=20
PushButton, "Run SQL", Main, 140, 280, 90, 30, 0),<BR>SQLEdit =3D =
create( MleText,=20
"", Main, 20, 320, 400, 100, 0),<BR>UserEdit =3D create( EditText, "User =
ID",=20
Main, 250, 280, 90, 25, 0),<BR>AuthEdit =3D create( EditText, =
"Password", Main,=20
350, 280, 90, 25, 0),<BR>MaxEdit =3D create( EditText, "-1", Main, 450, =
280, 30,=20
25, 0),<BR>MaxButton =3D create( PushButton, "Set Max", Main, 450, 320, =
90, 30,=20
0)</DIV>
<DIV>&nbsp;</DIV>
<DIV>atom hconn, max_records<BR>sequence query</DIV>
<DIV>&nbsp;</DIV>
<DIV>query =3D {}</DIV>
<DIV>&nbsp;</DIV>
<DIV>procedure connect()<BR>&nbsp;&nbsp;&nbsp; sequence dsn, user,=20
auth<BR>&nbsp;&nbsp;&nbsp; integer ok<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp; dsn =3D getLVSelectedText( DSN =
)<BR>&nbsp;&nbsp;&nbsp; dsn=20
=3D dsn[1]<BR>&nbsp;&nbsp;&nbsp; if not length(dsn)=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
return<BR>&nbsp;&nbsp;&nbsp;=20
end if<BR>&nbsp;&nbsp;&nbsp; user =3D getText( UserEdit =
)<BR>&nbsp;&nbsp;&nbsp;=20
auth =3D getText( AuthEdit )<BR>&nbsp;&nbsp;&nbsp; =
trace(1)<BR>&nbsp;&nbsp;&nbsp;=20
hconn =3D openConnectionODBC( dsn, user, auth )<BR>&nbsp;&nbsp;&nbsp; if =
not hconn=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ok =3D message_box( =
"Connection=20
Failed","ODBC Error", MB_ICONERROR)<BR>&nbsp;&nbsp;&nbsp;=20
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ok =3D message_box( =
"Connected=20
to: " &amp; dsn, "ODBC Connect", MB_OK )<BR>&nbsp;&nbsp;&nbsp; end =
if<BR>end=20
procedure<BR>onClick[ConnButton] =3D routine_id("connect")</DIV>
<DIV>&nbsp;</DIV>
<DIV>procedure run_query()<BR>&nbsp;&nbsp;&nbsp; atom =
fn<BR>&nbsp;&nbsp;&nbsp;=20
sequence sql<BR>&nbsp;&nbsp;&nbsp; object data<BR>&nbsp;&nbsp;&nbsp;=20
trace(1)<BR>&nbsp;&nbsp;&nbsp; if not hconn=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return =
<BR>&nbsp;&nbsp;&nbsp;=20
end if<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; sql =3D getText( =
SQLEdit=20
)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; if equal( sql, query ) =
and hconn=20
!=3D getCurrentHandle() then =
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fn =3D=20
open( "odbc.txt", "a")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
data =3D=20
getData( 0 )<BR>&nbsp;&nbsp;&nbsp;=20
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query =3D=20
sql<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
data =3D=20
execDirectODBC( hconn, sql =
)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
--freeHandleODBC( 0 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fn =
=3D open(=20
"odbc.txt", "w")<BR>&nbsp;&nbsp;&nbsp; end if<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp; if sequence( data ) then<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for i =3D 1 to length( =
data )=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

print(fn, data[i]) =
puts(fn,"\n")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
end for<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close( fn=20
)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not length( data )=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
fn =3D=20
message_box( "No more records to retrieve",=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"ODBC Demo",=20
MB_OK)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;=20
query =3D =
{}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

freeHandleODBC( 0 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
fn =3D=20
message_box( "See odbc.txt for results.",=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
"ODBC Demo", MB_OK=20
)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
if=20
max_records =3D -1 or length(data) &lt; max_records=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;=20
query =3D=20
{}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
freeHandleODBC( 0=20
)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
end=20
if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end =
if<BR>&nbsp;&nbsp;&nbsp;=20
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; odbcError( -data=20
)<BR>&nbsp;&nbsp;&nbsp; end if<BR>&nbsp;&nbsp;&nbsp; <BR>end=20
procedure<BR>onClick[SQLButton] =3D routine_id( "run_query" )</DIV>
<DIV>&nbsp;</DIV>
<DIV>procedure get_dsn()<BR>&nbsp;&nbsp;&nbsp; sequence=20
dsn<BR>&nbsp;&nbsp;&nbsp; integer ok<BR>&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; dsn =3D=20
dataSourcesODBC()<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; for i =3D =
1 to=20
length( dsn ) do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ok =3D =
addLVItem(=20
DSN, 0, dsn[i])<BR>&nbsp;&nbsp;&nbsp; end for<BR>end =
procedure<BR>onOpen[Main] =3D=20
routine_id("get_dsn")</DIV>
<DIV>&nbsp;</DIV>
<DIV>procedure set_max()<BR>&nbsp;&nbsp;&nbsp; integer =
max<BR>&nbsp;&nbsp;&nbsp;=20
max =3D getNumber( MaxEdit )<BR>&nbsp;&nbsp;&nbsp; if max=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_records =3D=20
max<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setMaxRecords( max=20
)<BR>&nbsp;&nbsp;&nbsp; end if<BR>end procedure<BR>onClick[MaxButton] =
=3D=20
routine_id("set_max")</DIV>
<DIV>&nbsp;</DIV>
<DIV>initODBC()</DIV>
<DIV>&nbsp;</DIV>
<DIV>WinMain( Main, Normal )<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>george</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3Dmatthewwalkerlewis at YAHOO.COM=20
href=3D"mailto:matthewwalkerlewis at YAHOO.COM">Matthew Lewis</A> </DIV>
<DIV><B>To:</B> <A title=3DEUforum at topica.com=20
href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV>
<DIV><B>Sent:</B> Thursday, December 19, 2002 3:47 PM</DIV>
<DIV><B>Subject:</B> RE: Matt's ODBC</DIV></DIV>
<DIV><BR></DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing =
List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
<BR><BR>George,<BR><BR>This appears to be the error code,=20
SQL_INVALID_HANDLE.&nbsp; Did you call<BR>initODBC()?&nbsp; This must be =
done in=20
order to set some things up.<BR><BR>Matt Lewis<BR><BR>-----Original=20
Message-----<BR>From: George Walters=20
[mailto:gwalters at sc.rr.com]<BR><BR><BR>Running Matt's odbc.exw example, =
I get a=20
handle from "openConnectionODBC()"<BR>of&nbsp; minus 2 (-2). Is this a=20
legitimate handle? If I continue it says I've<BR>conneced, but any sql =
statement=20
produces an error and the demo blows=20
up..<BR><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>This=20
email was sent to: <A=20
href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A><BR><BR>EASY =
UNSUBSCRIBE=20
click here: <A=20
href=3D"http://topica.com/u/?b1dd66.b2Shsm.Z3dhbHRl">http://topica.com/u/=
?b1dd66.b2Shsm.Z3dhbHRl</A><BR>Or=20
send an email to: <A=20
href=3D"mailto:EUforum-unsubscribe at topica.com">EUforum-unsubscribe@topica=
.com</A><BR><BR>T=20
O P I C A -- Register now to manage your mail!<BR><A=20
href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c=
om/partner/tag02/register</A><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_000_0046_01C2A788.ECA7B580--

new topic     » goto parent     » topic index » view message » categorize

7. Re: Matt's ODBC

This is a multi-part message in MIME format.

------=_NextPart_000_0056_01C2A80E.ECDCD860
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Well, I've found that if I leave off the name and password it will =
connect an run an sql script.....I'm confused.....I would think that the =
user name and password would have to be passed, but if I add it, it =
won't work. Maybe the ODBC driver send's that from it's setup. Can =
someone educate me on what's going on here...As you can see I'm an ODBC =
and mysql INFANT...


Here's some info from mysql...

[WinMySQLAdmin]
Server=3DC:/MYSQL/bin/mysqld-opt.exe
user=3Dgeorge
password=3Dnova

[mysqld]
basedir=3DC:/MYSQL
#bind-address=3D192.168.1.103
datadir=3DC:/MYSQL/data
#language=3DC:/MYSQL/share/your language directory
#slow query log#=3D
#tmpdir#=3D
#port=3D3306
#set-variable=3Dkey_buffer=3D16M
----- Original Message -----=20
From: Matthew Lewis=20
To: EUforum=20
Sent: Thursday, December 19, 2002 3:47 PM
Subject: RE: Matt's ODBC



George,

This appears to be the error code, SQL_INVALID_HANDLE.  Did you call
initODBC()?  This must be done in order to set some things up.

Matt Lewis

-----Original Message-----
From: George Walters [mailto:gwalters at sc.rr.com]


Running Matt's odbc.exw example, I get a handle from =
"openConnectionODBC()"
of  minus 2 (-2). Is this a legitimate handle? If I continue it says =
I've
conneced, but any sql statement produces an error and the demo blows =
up..




------=_NextPart_000_0056_01C2A80E.ECDCD860
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Well, I've found that if I leave off =
the name and=20
password it will connect an run an sql script.....I'm confused.....I =
would think=20
that the user name and password would have to be passed, but if I add =
it, it=20
won't work. Maybe the ODBC driver send's that from it's setup. Can =
someone=20
educate me on what's going on here...As you can see I'm an ODBC and =
mysql=20
INFANT...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Here's some info from =
mysql...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>[WinMySQLAdmin]<BR>Server=3DC:/MYSQL/bin/mysqld-opt.exe<BR>user=3D=
george<BR>password=3Dnova</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>[mysqld]<BR>basedir=3DC:/MYSQL<BR>#bind-address=3D192.168.1.103<=
BR>datadir=3DC:/MYSQL/data<BR>#language=3DC:/MYSQL/share/your=20
language directory<BR>#slow query=20
log#=3D<BR>#tmpdir#=3D<BR>#port=3D3306<BR>#set-variable=3Dkey_buffer=3D16=
M</FONT></DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3Dmatthewwalkerlewis at YAHOO.COM=20
href=3D"mailto:matthewwalkerlewis at YAHOO.COM">Matthew Lewis</A> </DIV>
<DIV><B>To:</B> <A title=3DEUforum at topica.com=20
href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV>
<DIV><B>Sent:</B> Thursday, December 19, 2002 3:47 PM</DIV>
<DIV><B>Subject:</B> RE: Matt's ODBC</DIV></DIV>
<DIV><BR></DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing =
List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
<BR><BR>George,<BR><BR>This appears to be the error code,=20
SQL_INVALID_HANDLE.&nbsp; Did you call<BR>initODBC()?&nbsp; This must be =
done in=20
order to set some things up.<BR><BR>Matt Lewis<BR><BR>-----Original=20
Message-----<BR>From: George Walters=20
[mailto:gwalters at sc.rr.com]<BR><BR><BR>Running Matt's odbc.exw example, =
I get a=20
handle from "openConnectionODBC()"<BR>of&nbsp; minus 2 (-2). Is this a=20
legitimate handle? If I continue it says I've<BR>conneced, but any sql =
statement=20
produces an error and the demo blows=20
up..<BR><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>This=20
email was sent to: <A=20
href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A><BR><BR>EASY =
UNSUBSCRIBE=20
click here: <A=20
href=3D"http://topica.com/u/?b1dd66.b2Shsm.Z3dhbHRl">http://topica.com/u/=
?b1dd66.b2Shsm.Z3dhbHRl</A><BR>Or=20
send an email to: <A=20
href=3D"mailto:EUforum-unsubscribe at topica.com">EUforum-unsubscribe@topica=
.com</A><BR><BR>T=20
O P I C A -- Register now to manage your mail!<BR><A=20
href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c=
om/partner/tag02/register</A><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_000_0056_01C2A80E.ECDCD860--

new topic     » goto parent     » topic index » view message » categorize

8. Re: Matt's ODBC

This is a multi-part message in MIME format.

------=_NextPart_000_0071_01C2A813.6ED08700
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

More on this, If I remove the user and password from MS ODBC setup and =
supply it in Matt's demo program, it works. So the user and password can =
be in one or the other place but not both. Matt would this be a bug in =
your wrapper? I certainly don't know enough to understand this.

george

----- Original Message -----=20
From: Matthew Lewis=20
To: EUforum=20
Sent: Thursday, December 19, 2002 3:47 PM
Subject: RE: Matt's ODBC



George,

This appears to be the error code, SQL_INVALID_HANDLE.  Did you call
initODBC()?  This must be done in order to set some things up.

Matt Lewis

-----Original Message-----
From: George Walters [mailto:gwalters at sc.rr.com]


Running Matt's odbc.exw example, I get a handle from =
"openConnectionODBC()"
of  minus 2 (-2). Is this a legitimate handle? If I continue it says =
I've
conneced, but any sql statement produces an error and the demo blows =
up..




------=_NextPart_000_0071_01C2A813.6ED08700
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>More on this, If I remove the user and =
password=20
from MS ODBC setup and supply it in Matt's demo program, it works. So =
the user=20
and password can be in one or the other place but not both. Matt would =
this be a=20
bug in your wrapper? I certainly don't know enough to understand=20
this.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>george</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3Dmatthewwalkerlewis at YAHOO.COM=20
href=3D"mailto:matthewwalkerlewis at YAHOO.COM">Matthew Lewis</A> </DIV>
<DIV><B>To:</B> <A title=3DEUforum at topica.com=20
href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV>
<DIV><B>Sent:</B> Thursday, December 19, 2002 3:47 PM</DIV>
<DIV><B>Subject:</B> RE: Matt's ODBC</DIV></DIV>
<DIV><BR></DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing =
List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
<BR><BR>George,<BR><BR>This appears to be the error code,=20
SQL_INVALID_HANDLE.&nbsp; Did you call<BR>initODBC()?&nbsp; This must be =
done in=20
order to set some things up.<BR><BR>Matt Lewis<BR><BR>-----Original=20
Message-----<BR>From: George Walters=20
[mailto:gwalters at sc.rr.com]<BR><BR><BR>Running Matt's odbc.exw example, =
I get a=20
handle from "openConnectionODBC()"<BR>of&nbsp; minus 2 (-2). Is this a=20
legitimate handle? If I continue it says I've<BR>conneced, but any sql =
statement=20
produces an error and the demo blows=20
up..<BR><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>This=20
email was sent to: <A=20
href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A><BR><BR>EASY =
UNSUBSCRIBE=20
click here: <A=20
href=3D"http://topica.com/u/?b1dd66.b2Shsm.Z3dhbHRl">http://topica.com/u/=
?b1dd66.b2Shsm.Z3dhbHRl</A><BR>Or=20
send an email to: <A=20
href=3D"mailto:EUforum-unsubscribe at topica.com">EUforum-unsubscribe@topica=
.com</A><BR><BR>T=20
O P I C A -- Register now to manage your mail!<BR><A=20
href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c=
om/partner/tag02/register</A><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_000_0071_01C2A813.6ED08700--

new topic     » goto parent     » topic index » view message » categorize

9. Re: Matt's ODBC

This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C2A7FD.018EDEA0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0009_01C2A7FD.018EDEA0"


------=_NextPart_001_0009_01C2A7FD.018EDEA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Matt, I also get mysql listed twice in the display your demo produces, =
but in the MS DSN panel it shows up correctly only once. Any Idea's on =
this?











george





----- Original Message -----=20
From: Matthew Lewis=20
To: EUforum=20
Sent: Thursday, December 19, 2002 3:47 PM
Subject: RE: Matt's ODBC


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing List =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

George,

This appears to be the error code, SQL_INVALID_HANDLE.  Did you call
initODBC()?  This must be done in order to set some things up.

Matt Lewis

-----Original Message-----
From: George Walters [mailto:gwalters at sc.rr.com]


Running Matt's odbc.exw example, I get a handle from =
"openConnectionODBC()"
of  minus 2 (-2). Is this a legitimate handle? If I continue it says =
I've
conneced, but any sql statement produces an error and the demo blows =
up..

=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This email was sent to: gwalters at sc.rr.com

EASY UNSUBSCRIBE click here: http://topica.com/u/?b1dd66.b2Shsm.Z3dhbHRl
Or send an email to: EUforum-unsubscribe at topica.com

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

------=_NextPart_001_0009_01C2A7FD.018EDEA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Matt, I also get mysql listed twice in =
the display=20
your demo produces, but in the MS DSN panel it shows up correctly only =
once. Any=20
Idea's on this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><IMG height=3D264=20
src=3D"cid:000701c2a826$ea4354e0$6701a8c0 at sc.rr.com" width=3D324=20
v:shapes=3D"_x0000_i1025"></P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><IMG height=3D360=20
src=3D"cid:000701c2a826$ea4354e0$6701a8c0 at sc.rr.com" width=3D432=20
v:shapes=3D"_x0000_i1025"></P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT face=3DArial=20
size=3D2>george</FONT></P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in =
0pt">&nbsp;</P><?xml:namespace prefix=20
=3D o ns =3D "urn:schemas-microsoft-com:office:office" =
/><o:p></o:p></DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3Dmatthewwalkerlewis at YAHOO.COM=20
href=3D"mailto:matthewwalkerlewis at YAHOO.COM">Matthew Lewis</A> </DIV>
<DIV><B>To:</B> <A title=3DEUforum at topica.com=20
href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV>
<DIV><B>Sent:</B> Thursday, December 19, 2002 3:47 PM</DIV>
<DIV><B>Subject:</B> RE: Matt's ODBC</DIV></DIV>
<DIV><BR></DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing =
List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
<BR><BR>George,<BR><BR>This appears to be the error code,=20
SQL_INVALID_HANDLE.&nbsp; Did you call<BR>initODBC()?&nbsp; This must be =
done in=20
order to set some things up.<BR><BR>Matt Lewis<BR><BR>-----Original=20
Message-----<BR>From: George Walters=20
[mailto:gwalters at sc.rr.com]<BR><BR><BR>Running Matt's odbc.exw example, =
I get a=20
handle from "openConnectionODBC()"<BR>of&nbsp; minus 2 (-2). Is this a=20
legitimate handle? If I continue it says I've<BR>conneced, but any sql =
statement=20
produces an error and the demo blows=20
up..<BR><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>This=20
email was sent to: <A=20
href=3D"mailto:gwalters at sc.rr.com">gwalters at sc.rr.com</A><BR><BR>EASY =
UNSUBSCRIBE=20
click here: <A=20
href=3D"http://topica.com/u/?b1dd66.b2Shsm.Z3dhbHRl">http://topica.com/u/=
?b1dd66.b2Shsm.Z3dhbHRl</A><BR>Or=20
send an email to: <A=20
href=3D"mailto:EUforum-unsubscribe at topica.com">EUforum-unsubscribe@topica=
.com</A><BR><BR>T=20
O P I C A -- Register now to manage your mail!<BR><A=20
href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c=
om/partner/tag02/register</A><BR>=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_001_0009_01C2A7FD.018EDEA0--

------=_NextPart_000_0008_01C2A7FD.018EDEA0
Content-Type: image/jpeg;
name="clip_image002.jpg"

new topic     » goto parent     » topic index » view message » categorize

10. Re: Matt's ODBC

Yes, it's probably a bug in my wrapper.  It was mainly a proof of concept that
could be expanded as people needed it.  I didn't get a lot of feedback from it,
and I haven't really used it, so it's stayed pretty much a static piece of
work.  You might also check out Tone's ODBC wrapper, as it seemed a bit more
mature when I looked at it.  Also, I'd recommend becomming familiar with
msdn.microsoft.com, as that's where all the ODBC documentation can be found.

I'll take a look in detail at my code next week (don't have access to the right
machine ATM).

Matt Lewis

--- George Walters <gwalters at sc.rr.com> wrote:
> 
> More on this, If I remove the user and password from MS ODBC setup and supply
> it in Matt's demo program, it works. So the user and password can be in one
> or the other place but not both. Matt would this be a bug in your wrapper? I
> certainly don't know enough to understand this.
> 
> george
> 
> ----- Original Message ----- 
> From: Matthew Lewis 
> To: EUforum 
> Sent: Thursday, December 19, 2002 3:47 PM
> Subject: RE: Matt's ODBC
> 
> 
> George,
> 
> This appears to be the error code, SQL_INVALID_HANDLE.  Did you call
> initODBC()?  This must be done in order to set some things up.
> 
> Matt Lewis
> 
> -----Original Message-----
> From: George Walters [mailto:gwalters at sc.rr.com]
> 
> 
> Running Matt's odbc.exw example, I get a handle from "openConnectionODBC()"
> of  minus 2 (-2). Is this a legitimate handle? If I continue it says I've
> conneced, but any sql statement produces an error and the demo blows up..
> 
> ==^^===============================================================
> This email was sent to: matthewwalkerlewis at YAHOO.COM
> 
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

new topic     » goto parent     » topic index » view message » categorize

11. Matt's ODBC

Matt, I've been using your ODBC wrapper for quite a long time w/o any 
issues, until now. When I'm loading it up with a large number of record 
additions I get a return of "invalid file handle". It seems that mysql 
must get more transactions than it can handle, they must be getting 
backed up and we're not evaluating an "i'm busy" return code.... at 
least that's all I can figure. I can wait a bit, restart the program 
from the same point and it continues w/o an issue until the same thing 
happens again. Could you think about this for a bit and see if you can 
find the problem. IF it makes any difference, I'm running on XP sp2. 
win32 59.1 and mysql.

Thanks

george

new topic     » goto parent     » topic index » view message » categorize

12. Re: Matt's ODBC

George Walters wrote:
> 
> Matt, I've been using your ODBC wrapper for quite a long time w/o any 
> issues, until now. When I'm loading it up with a large number of record 
> additions I get a return of "invalid file handle". It seems that mysql 
> must get more transactions than it can handle, they must be getting 
> backed up and we're not evaluating an "i'm busy" return code.... at 
> least that's all I can figure. I can wait a bit, restart the program 
> from the same point and it continues w/o an issue until the same thing 
> happens again. Could you think about this for a bit and see if you can 
> find the problem. IF it makes any difference, I'm running on XP sp2. 
> win32 59.1 and mysql.

Hmm.  That's odd.  I'll think about it and see what I can come up with.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu