Running MobileVB Ultralite 8 application in Windows after installing Ultralite 9

I have 3 applications.  I developed my first 2 using
Ultralite 8 technology.  For my 3rd, I installed Ultralite 9
so I could use use dynamicSQL.  In MobileVB, under
Project,References, I can see both "iAnywhere Solutions
Ultralite for MobileVB 8" and "iAnywhere Solutions Ultralite
for MobileVB 9".  So everything is installed correctly.

When I want to run my 1st or 2nd application in
Windows(using db connection techniques for UL 8),  I can't
run the app.  I get errors because it wants me to use the
UltraLite 9 database connection syntax.

I do not understand why I am getting these errors.  I have
"iAnywhere Solutions Ultralite for MobileVB 8" selected in
my Project,References window in VB.

Any ideas?

Thanks,
Jeff.
0
Jeff
12/5/2004 6:52:47 PM
sybase.sqlanywhere.ultralite 2982 articles. 0 followers. Follow

4 Replies
549 Views

Similar Articles

[PageSpeed] 59

Hi Jeff,

Due to a limitation in MobileVB, you can only have one version of UltraLite 
(or any other MobileVB component for that matter) registered on your system 
at any one time.  When you see both 8 and 9 on your machine, the version 9 
component automatically gets used regardless of which your project 
references.

Having said that, AFAIK any connection string you use in a version 8 app 
should work as-is with version 9.  What is the error message that you're 
getting?

    - Alex.

-- 
Alex Reif
Product Manager
iAnywhere Solutions

<Jeff> wrote in message news:41b358ff.26f7.1681692777@sybase.com...
>I have 3 applications.  I developed my first 2 using
> Ultralite 8 technology.  For my 3rd, I installed Ultralite 9
> so I could use use dynamicSQL.  In MobileVB, under
> Project,References, I can see both "iAnywhere Solutions
> Ultralite for MobileVB 8" and "iAnywhere Solutions Ultralite
> for MobileVB 9".  So everything is installed correctly.
>
> When I want to run my 1st or 2nd application in
> Windows(using db connection techniques for UL 8),  I can't
> run the app.  I get errors because it wants me to use the
> UltraLite 9 database connection syntax.
>
> I do not understand why I am getting these errors.  I have
> "iAnywhere Solutions Ultralite for MobileVB 8" selected in
> my Project,References window in VB.
>
> Any ideas?
>
> Thanks,
> Jeff. 


0
Alex
12/6/2004 1:54:25 PM
Thanks Alex.

The error I'm getting is that it doens't recognize my table
name.  I didn't make any changes to the code after I
upgraded to UL9.  The error is because it can't connect to
the database...  it wants me to put a ULConnectionParms
object on the form with paths defined...  so I am thinking
that I can't run this UL8 app in Windows unless I connect to
the db in my app using UL9 methods.

Here is my code from my UL8 app....

Dim conn_parms As String
Dim open_parms As String
Dim schema_parms As String
conn_parms = "uid=DBA;pwd=SQL"

open_parms = conn_parms & ";" & _
    "FILE_NAME=D:\EMLite.udb"
schema_parms = open_parms & ";" & _
    "SCHEMA_FILE=D:\EMLite.usm"

On Error Resume Next

Set Connection = _
    DatabaseMgr.OpenConnection(open_parms)
If Err.Number = ULSQLCode.ulSQLE_NOERROR Then
    'MsgBox "Connected to an existing database"
ElseIf Err.Number = _
   ULSQLCode.ulSQLE_DATABASE_NOT_FOUND Then
    Err.Clear
    Set Connection = _
    DatabaseMgr.CreateDatabase(schema_parms)
End If

I get "Run-time error 91 - Object variable or With block
variable not set."  When I click debug, it goes to a line
where a table is referenced.

Does this mean that it can't find ULEMPLOYEE?  Keep in mind
that I can copy this code to a UL8 box and it'll work
perfect.

Thanks for any help Alex,
Jeff.




> Hi Jeff,
>
> Due to a limitation in MobileVB, you can only have one
> version of UltraLite  (or any other MobileVB component for
> that matter) registered on your system  at any one time.
> When you see both 8 and 9 on your machine, the version 9
> component automatically gets used regardless of which your
> project  references.
>
> Having said that, AFAIK any connection string you use in a
> version 8 app  should work as-is with version 9.  What is
> the error message that you're  getting?
>
>     - Alex.
>
> --
> Alex Reif
> Product Manager
> iAnywhere Solutions
>
> <Jeff> wrote in message
> news:41b358ff.26f7.1681692777@sybase.com... >I have 3
> > applications.  I developed my first 2 using Ultralite 8
> > technology.  For my 3rd, I installed Ultralite 9 so I
> > could use use dynamicSQL.  In MobileVB, under Project
> > ,References, I can see both "iAnywhere Solutions
> Ultralite for MobileVB 8" and "iAnywhere Solutions
> > Ultralite for MobileVB 9".  So everything is installed
> correctly. >
> > When I want to run my 1st or 2nd application in
> > Windows(using db connection techniques for UL 8),  I
> > can't run the app.  I get errors because it wants me to
> > use the UltraLite 9 database connection syntax.
> >
> > I do not understand why I am getting these errors.  I
> > have "iAnywhere Solutions Ultralite for MobileVB 8"
> > selected in my Project,References window in VB.
> >
> > Any ideas?
> >
> > Thanks,
> > Jeff.
>
>
0
Jeff
12/7/2004 10:59:15 PM
Thanks Alex.

The error I'm getting is that it doens't recognize my table
name.  I didn't make any changes to the code after I
upgraded to UL9.  The error is because it can't connect to
the database...  it wants me to put a ULConnectionParms
object on the form with paths defined...  so I am thinking
that I can't run this UL8 app in Windows unless I connect to
the db in my app using UL9 methods.

Here is my code from my UL8 app....

Dim conn_parms As String
Dim open_parms As String
Dim schema_parms As String
conn_parms = "uid=DBA;pwd=SQL"

open_parms = conn_parms & ";" & _
    "FILE_NAME=D:\EMLite.udb"
schema_parms = open_parms & ";" & _
    "SCHEMA_FILE=D:\EMLite.usm"

On Error Resume Next

Set Connection = _
    DatabaseMgr.OpenConnection(open_parms)
If Err.Number = ULSQLCode.ulSQLE_NOERROR Then
    'MsgBox "Connected to an existing database"
ElseIf Err.Number = _
   ULSQLCode.ulSQLE_DATABASE_NOT_FOUND Then
    Err.Clear
    Set Connection = _
    DatabaseMgr.CreateDatabase(schema_parms)
End If

I get "Run-time error 91 - Object variable or With block
variable not set."  When I click debug, it goes to a line
where a table is referenced.

Does this mean that it can't find ULEMPLOYEE?  Keep in mind
that I can copy this code to a UL8 box and it'll work
perfect.

Thanks for any help Alex,
Jeff.




> Hi Jeff,
>
> Due to a limitation in MobileVB, you can only have one
> version of UltraLite  (or any other MobileVB component for
> that matter) registered on your system  at any one time.
> When you see both 8 and 9 on your machine, the version 9
> component automatically gets used regardless of which your
> project  references.
>
> Having said that, AFAIK any connection string you use in a
> version 8 app  should work as-is with version 9.  What is
> the error message that you're  getting?
>
>     - Alex.
>
> --
> Alex Reif
> Product Manager
> iAnywhere Solutions
>
> <Jeff> wrote in message
> news:41b358ff.26f7.1681692777@sybase.com... >I have 3
> > applications.  I developed my first 2 using Ultralite 8
> > technology.  For my 3rd, I installed Ultralite 9 so I
> > could use use dynamicSQL.  In MobileVB, under Project
> > ,References, I can see both "iAnywhere Solutions
> Ultralite for MobileVB 8" and "iAnywhere Solutions
> > Ultralite for MobileVB 9".  So everything is installed
> correctly. >
> > When I want to run my 1st or 2nd application in
> > Windows(using db connection techniques for UL 8),  I
> > can't run the app.  I get errors because it wants me to
> > use the UltraLite 9 database connection syntax.
> >
> > I do not understand why I am getting these errors.  I
> > have "iAnywhere Solutions Ultralite for MobileVB 8"
> > selected in my Project,References window in VB.
> >
> > Any ideas?
> >
> > Thanks,
> > Jeff.
>
>

> Hi Jeff,
>
> Due to a limitation in MobileVB, you can only have one
> version of UltraLite  (or any other MobileVB component for
> that matter) registered on your system  at any one time.
> When you see both 8 and 9 on your machine, the version 9
> component automatically gets used regardless of which your
> project  references.
>
> Having said that, AFAIK any connection string you use in a
> version 8 app  should work as-is with version 9.  What is
> the error message that you're  getting?
>
>     - Alex.
>
> --
> Alex Reif
> Product Manager
> iAnywhere Solutions
>
> <Jeff> wrote in message
> news:41b358ff.26f7.1681692777@sybase.com... >I have 3
> > applications.  I developed my first 2 using Ultralite 8
> > technology.  For my 3rd, I installed Ultralite 9 so I
> > could use use dynamicSQL.  In MobileVB, under Project
> > ,References, I can see both "iAnywhere Solutions
> Ultralite for MobileVB 8" and "iAnywhere Solutions
> > Ultralite for MobileVB 9".  So everything is installed
> correctly. >
> > When I want to run my 1st or 2nd application in
> > Windows(using db connection techniques for UL 8),  I
> > can't run the app.  I get errors because it wants me to
> > use the UltraLite 9 database connection syntax.
> >
> > I do not understand why I am getting these errors.  I
> > have "iAnywhere Solutions Ultralite for MobileVB 8"
> > selected in my Project,References window in VB.
> >
> > Any ideas?
> >
> > Thanks,
> > Jeff.
>
>
0
Jeff
12/7/2004 11:00:44 PM
Jeff,

You don't need to use ULConnectionParms, there are two flavours of the 
open/create methods on the ULDatabaseManager object.  One uses a connection 
string, the other a ULConnectionParms object.

Can you verify that your calls to GetTable are returning successfully?  The 
call will fail silently if you've still got 'On Error Resume Next' set, and 
if you try to use the table in another method and it hasn't been fetched, 
you'll get an error like the one you're seeing.  Easiest would probably be 
to put an 'On Error GoTo 0' immediately after the code snippet you've got 
below (CustDB does this).

If GetTable is failing, double-check your schema file...

    - Alex.

-- 
Alex Reif
Product Manager
iAnywhere Solutions

<Jeff> wrote in message news:41b63618.74c8.1681692777@sybase.com...
> Thanks Alex.
>
> The error I'm getting is that it doens't recognize my table
> name.  I didn't make any changes to the code after I
> upgraded to UL9.  The error is because it can't connect to
> the database...  it wants me to put a ULConnectionParms
> object on the form with paths defined...  so I am thinking
> that I can't run this UL8 app in Windows unless I connect to
> the db in my app using UL9 methods.
>
> Here is my code from my UL8 app....
>
> Dim conn_parms As String
> Dim open_parms As String
> Dim schema_parms As String
> conn_parms = "uid=DBA;pwd=SQL"
>
> open_parms = conn_parms & ";" & _
>    "FILE_NAME=D:\EMLite.udb"
> schema_parms = open_parms & ";" & _
>    "SCHEMA_FILE=D:\EMLite.usm"
>
> On Error Resume Next
>
> Set Connection = _
>    DatabaseMgr.OpenConnection(open_parms)
> If Err.Number = ULSQLCode.ulSQLE_NOERROR Then
>    'MsgBox "Connected to an existing database"
> ElseIf Err.Number = _
>   ULSQLCode.ulSQLE_DATABASE_NOT_FOUND Then
>    Err.Clear
>    Set Connection = _
>    DatabaseMgr.CreateDatabase(schema_parms)
> End If
>
> I get "Run-time error 91 - Object variable or With block
> variable not set."  When I click debug, it goes to a line
> where a table is referenced.
>
> Does this mean that it can't find ULEMPLOYEE?  Keep in mind
> that I can copy this code to a UL8 box and it'll work
> perfect.
>
> Thanks for any help Alex,
> Jeff.
>
>
>
>
>> Hi Jeff,
>>
>> Due to a limitation in MobileVB, you can only have one
>> version of UltraLite  (or any other MobileVB component for
>> that matter) registered on your system  at any one time.
>> When you see both 8 and 9 on your machine, the version 9
>> component automatically gets used regardless of which your
>> project  references.
>>
>> Having said that, AFAIK any connection string you use in a
>> version 8 app  should work as-is with version 9.  What is
>> the error message that you're  getting?
>>
>>     - Alex.
>>
>> --
>> Alex Reif
>> Product Manager
>> iAnywhere Solutions
>>
>> <Jeff> wrote in message
>> news:41b358ff.26f7.1681692777@sybase.com... >I have 3
>> > applications.  I developed my first 2 using Ultralite 8
>> > technology.  For my 3rd, I installed Ultralite 9 so I
>> > could use use dynamicSQL.  In MobileVB, under Project
>> > ,References, I can see both "iAnywhere Solutions
>> Ultralite for MobileVB 8" and "iAnywhere Solutions
>> > Ultralite for MobileVB 9".  So everything is installed
>> correctly. >
>> > When I want to run my 1st or 2nd application in
>> > Windows(using db connection techniques for UL 8),  I
>> > can't run the app.  I get errors because it wants me to
>> > use the UltraLite 9 database connection syntax.
>> >
>> > I do not understand why I am getting these errors.  I
>> > have "iAnywhere Solutions Ultralite for MobileVB 8"
>> > selected in my Project,References window in VB.
>> >
>> > Any ideas?
>> >
>> > Thanks,
>> > Jeff.
>>
>>
>
>> Hi Jeff,
>>
>> Due to a limitation in MobileVB, you can only have one
>> version of UltraLite  (or any other MobileVB component for
>> that matter) registered on your system  at any one time.
>> When you see both 8 and 9 on your machine, the version 9
>> component automatically gets used regardless of which your
>> project  references.
>>
>> Having said that, AFAIK any connection string you use in a
>> version 8 app  should work as-is with version 9.  What is
>> the error message that you're  getting?
>>
>>     - Alex.
>>
>> --
>> Alex Reif
>> Product Manager
>> iAnywhere Solutions
>>
>> <Jeff> wrote in message
>> news:41b358ff.26f7.1681692777@sybase.com... >I have 3
>> > applications.  I developed my first 2 using Ultralite 8
>> > technology.  For my 3rd, I installed Ultralite 9 so I
>> > could use use dynamicSQL.  In MobileVB, under Project
>> > ,References, I can see both "iAnywhere Solutions
>> Ultralite for MobileVB 8" and "iAnywhere Solutions
>> > Ultralite for MobileVB 9".  So everything is installed
>> correctly. >
>> > When I want to run my 1st or 2nd application in
>> > Windows(using db connection techniques for UL 8),  I
>> > can't run the app.  I get errors because it wants me to
>> > use the UltraLite 9 database connection syntax.
>> >
>> > I do not understand why I am getting these errors.  I
>> > have "iAnywhere Solutions Ultralite for MobileVB 8"
>> > selected in my Project,References window in VB.
>> >
>> > Any ideas?
>> >
>> > Thanks,
>> > Jeff.
>>
>> 


0
Alex
12/8/2004 2:54:19 PM
Reply: