Web Connection
Create SQL Server Tables - wws_ID fields missing
Gravatar is a globally recognized avatar based on your email address. Create SQL Server Tables - wws_ID fields missing
  Mike McDonald
  All
  Jan 18, 2019 @ 11:43am

Rick -

If I use the Management Console and select to "Create SQL Server Tables", it will create the logging tables wwRequestLog and wwSession, as well as wws_id. However, the wws_id table only contains the fields tablename and id.

If I then use the Console to "Create New Business Object" and choose 'SQL Data' and 'Create Entry in ID Table', the process fails with "Invalid column name 'pkfield'. [1526:207]".

The GenerateBusObject() method is trying to add a record and specifying fields tablename, id, pkfield, pkfieldtyp, pkwidth, but only tablename and id exist. If the wws_id table didn't exist, it would be created with all those fields, but it was created by Create SQL Server Tables with only the first two fields.

- Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Create SQL Server Tables - wws_ID fields missing
  Rick Strahl
  Mike McDonald
  Jan 18, 2019 @ 01:33pm

Thank you. Fixed and updated.

There were actually quite a few other issues in the business object builder that have been addressed now as well.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Create SQL Server Tables - wws_ID fields missing
  Mike McDonald
  Rick Strahl
  Jan 18, 2019 @ 02:09pm

Rick -

Version 7.02 - wwBusinessBuilder:: GenerateBusObject() contains SET STEP ON causing the debugger to pop up.

- Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Create SQL Server Tables - wws_ID fields missing
  Mike McDonald
  Rick Strahl
  Jan 18, 2019 @ 02:20pm

Rick -

When creating the MyNewBizObject.prg file, the following lines are added to the top..

SET PROCEDURE TO wwBusinessObject ADDITIVE
SET PROCEDURE TO wwUtils ADDITIVE
SET PROCEDURE TO wwCollections ADDITIVE
SET PROCEDURE TO myNewBizObject.prg ADDITIVE

For a SQL business object, that needs to include

SET PROCEDURE TO wwSQL ADDITIVE

Otherwise you get "Class definition WWSQL is not found" if you just DO myNewBizObject, instantiate the object and try to call anything that hits SQL.

- Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Create SQL Server Tables - wws_ID fields missing
  Rick Strahl
  Mike McDonald
  Jan 18, 2019 @ 05:57pm

Added.

+++ Rick ---

© 1996-2019