Visual Basic and Watcom SQL 
Author Message
 Visual Basic and Watcom SQL

Was wondering if anyone can help with following problem:

I set up a small Visual Basic app to connect to the version of
Watcom SQL supplied with PowerBuilder Desktop (single user verison
of the DB). I was able to use the DataControl in Visual Basic to set up
a connection to the database. I had previously created a test database
with a few records. My Vis. Basic form shows two fields and I can
easily scroll back and forth among the records in the database (I had
preloaded data into it when creating it from PowerBuilder).
The problem:
attempting to add, update or delete records fails and tells me that
I am attempting an illegal operation. It highlights the offending code
for example:   Data1.Recordset.AddNew    This syntax works fine with
something like Access databases but not with Watcom. It appears to
be a permissions problem, but I have logged into the database through
the dialog that appears with the "dba" and "sql" UID and PWD. These
were what it was created under.

Does anyone have any suggestions as to why Visual Basic cannot perform
any update functions to this database? Can Watcom SQL be used with
Visual Basic?? Any help would be greatly appreciated.

Thanks.

--Peter Brooks

--
Peter Brooks                    Labrynth Technologies, Inc.

                                         708-953-8171



Sat, 21 Jun 1997 14:05:57 GMT
 Visual Basic and Watcom SQL

Quote:

> Was wondering if anyone can help with following problem:
> I set up a small Visual Basic app to connect to the version of
> Watcom SQL supplied with PowerBuilder Desktop (single user verison

[munch]

Quote:
> The problem:
> attempting to add, update or delete records fails and tells me that
> I am attempting an illegal operation. It highlights the offending code
> for example:   Data1.Recordset.AddNew    This syntax works fine with
> something like Access databases but not with Watcom. It appears to

Make sure that  A) your operation uses fields from one table only
                B) you have a primary key AND unique index for that table

VB will not allow you to modify records in a set resulting from a multi-
table query, nor will it allow you to modify a table that does not have
a primary key/unique index set.

If this doesn't work, please post more info about your table and query;
it'll make it easier to pinpoint your problem.

--

DBM Database Marketing Oy, Helsinki, FINLAND    " Q: What is the opposite
Tel: +358 0 605 900, Fax: +358 0 605 991         of information? "



Sat, 21 Jun 1997 14:35:54 GMT
 Visual Basic and Watcom SQL

Quote:


> > Was wondering if anyone can help with following problem:

> > I set up a small Visual Basic app to connect to the version of
> > Watcom SQL supplied with PowerBuilder Desktop (single user verison

> [munch]

> > The problem:
> > attempting to add, update or delete records fails and tells me that
> > I am attempting an illegal operation. It highlights the offending code
> > for example:   Data1.Recordset.AddNew    This syntax works fine with
> > something like Access databases but not with Watcom. It appears to

> Make sure that  A) your operation uses fields from one table only
>                 B) you have a primary key AND unique index for that table

> VB will not allow you to modify records in a set resulting from a multi-
> table query, nor will it allow you to modify a table that does not have
> a primary key/unique index set.

> If this doesn't work, please post more info about your table and query;
> it'll make it easier to pinpoint your problem.

> --

> DBM Database Marketing Oy, Helsinki, FINLAND    " Q: What is the opposite
> Tel: +358 0 605 900, Fax: +358 0 605 991         of information? "

Ebbe:

Thanks for you post. That was exactly what the problem was. I had a primary key
but not a unique index for that table. I corrected that and things worked
immediately.
Appreciate your help.  
(Its amazing to me sometimes how much really good help is available on the net).

--Peter Brooks

--
Peter Brooks                    Labrynth Technologies, Inc.

                                         708-953-8171



Sun, 22 Jun 1997 23:41:53 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Migrating from Visual Basic 3 SQL 4.0 to Visual Basic 5.0 and/or SQL Anywhere

2. MA-BOSTON-101351--Visual Basic-MS SQL Server-ORACLE-Informix-Software Engineer - Visual Basic

3. NC-Raleigh-93008--Visual Basic-SQL-Object Oriented Design-Visual Basic Programmer

4. 13644-WA-Seattle Area-Visual Basic-Visual Basic-ORACLE-SQL Server-Software Devel

5. MO-ST LOUIS-110495--Visual Basic-ORACLE-PL/SQL-VISUAL BASIC DEVELOPER

6. MI-Battle Creek-260624--Visual Basic-Windows NT-C-ORACLE-SQL-Visual Basic Programmer

7. 37593-TN-MEMPHIS-Visual Basic-SQL-Visual Basic Programmer Analyst JR/SR

8. 13644-WA-Seattle Area-Visual Basic-Visual Basic-ORACLE-MS SQL Server-Software De

9. 42542-TN-MEMPHIS-Visual Basic-MS SQL Server-ORACLE-Informix-VISUAL BASIC PROGRAMMER

10. 13644-WA-Seattle Area-Visual Basic-Visual Basic-ORACLE-MS SQL Server-Software De


 
Powered by phpBB® Forum Software