odbc connection error

// Profile EAS Demo DB V110
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
I wrote a db connection with the default connection
I test it in DB PROFILE,it's ok
but when i copy it to the program,then it can't connect the
db
please help me solving it,thx!!!
application,open event:
SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB
V110;UID=dba;PWD=sql'"
IF SQLCA.SQLCode = -1 THEN

        MessageBox("SQL error", SQLCA.SQLErrText)

END IF
0
sweet
10/2/2007 7:01:07 AM
sybase.net.webform 1327 articles. 0 followers. Follow

3 Replies
716 Views

Similar Articles

[PageSpeed] 42

Did you add

Connect using SQLCA;

before the IF....END IF statement?


<sweet> wrote in message news:4701ecb3.b82.1681692777@sybase.com...
> // Profile EAS Demo DB V110
> SQLCA.DBMS = "ODBC"
> SQLCA.AutoCommit = False
> I wrote a db connection with the default connection
> I test it in DB PROFILE,it's ok
> but when i copy it to the program,then it can't connect the
> db
> please help me solving it,thx!!!
> application,open event:
> SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB
> V110;UID=dba;PWD=sql'"
> IF SQLCA.SQLCode = -1 THEN
>
>        MessageBox("SQL error", SQLCA.SQLErrText)
>
> END IF 


0
Daniel
10/2/2007 7:43:34 AM
thx,I add this Connect using SQLCA;
and solved it
> Did you add
>
> Connect using SQLCA;
>
> before the IF....END IF statement?
>
>
> <sweet> wrote in message
> > news:4701ecb3.b82.1681692777@sybase.com... // Profile
> > EAS Demo DB V110 SQLCA.DBMS = "ODBC"
> > SQLCA.AutoCommit = False
> > I wrote a db connection with the default connection
> > I test it in DB PROFILE,it's ok
> > but when i copy it to the program,then it can't connect
> > the db
> > please help me solving it,thx!!!
> > application,open event:
> > SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB
> > V110;UID=dba;PWD=sql'"
> > IF SQLCA.SQLCode = -1 THEN
> >
> >        MessageBox("SQL error", SQLCA.SQLErrText)
> >
> > END IF
>
>
0
sweet
10/2/2007 8:01:55 AM
sweet :)

<sweet> wrote in message news:4701faf3.cbc.1681692777@sybase.com...
> thx,I add this Connect using SQLCA;
> and solved it
>> Did you add
>>
>> Connect using SQLCA;
>>
>> before the IF....END IF statement?
>>
>>
>> <sweet> wrote in message
>> > news:4701ecb3.b82.1681692777@sybase.com... // Profile
>> > EAS Demo DB V110 SQLCA.DBMS = "ODBC"
>> > SQLCA.AutoCommit = False
>> > I wrote a db connection with the default connection
>> > I test it in DB PROFILE,it's ok
>> > but when i copy it to the program,then it can't connect
>> > the db
>> > please help me solving it,thx!!!
>> > application,open event:
>> > SQLCA.DBParm = "ConnectString='DSN=EAS Demo DB
>> > V110;UID=dba;PWD=sql'"
>> > IF SQLCA.SQLCode = -1 THEN
>> >
>> >        MessageBox("SQL error", SQLCA.SQLErrText)
>> >
>> > END IF
>>
>> 


0
Daniel
10/3/2007 5:46:04 AM
Reply: