Accessing wizard generated code

Accessing wizard generated code

Post by Paul Badg » Thu, 16 Dec 1999 04:00:00



I recently asked the same question that I think you are asking.  If
you want to add code into a button but still have the default code
run, check out the DODEFAULT() command.  Be careful though, I found
out that if I don't know what the default code is doing, I often write
code that screws up the default code.
Quote:>The code is most likely being inherited from classes.  You will need to use
>the Properties window in the Form Designer to determine what class the
>object is descendant from, and where it is located, and then use MODIFY
>CLASS to open the Class Designer and view the code.

>> I'm getting my feet wet with VFP 5 and have generated a screen with the
>> Form Wizard.  Of course, there are certain things I need to have happen
>> concurrent with some of the wizard's navigation buttons, but I can't
>> figure out how to touch the code they are running.  As best I can figure
>> out, my putting ANY code behind any of the button set buttons causes it
>> to only execute my statement(s) and not the boilerplate code.

 
 
 

1. Error in Wizard generated code

80040e14

If fNeedRecordset Then
    Set Company = Server.CreateObject("ADODB.Connection")
    Company.ConnectionTimeout = Session("Company_ConnectionTimeout")
    Company.CommandTimeout = Session("Company_CommandTimeout")
    Company.Open Session("Company_ConnectionString"),
Session("Company_RuntimeUserName"), Session("Company_RuntimePassword")
    Set cmdTemp = Server.CreateObject("ADODB.Command")
    Set rsPCompanyContact = Server.CreateObject("ADODB.Recordset")
    cmdTemp.CommandText = "SELECT ""ContactID"", ""Title"",
""Forename"", ""MiddleName"", ""Surname"", ""Salutation"",
""Position"", ""Telephone"", ""Alternate"", ""Home"", ""Mobile"",
""Pager"", ""Fax"", ""Minicom"", ""EMailWork"", ""EMailPersonal"",
""Homepage"", ""LastUsed"", ""LastContact"" FROM dbo.""Contact"""
    cmdTemp.CommandType = 1
    Set cmdTemp.ActiveConnection = Company
    rsPCompanyContact.Open cmdTemp, , 1, 3
End If

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect
syntax near 'Contact'.

/Money/PCompanyList.asp, line 299

The line is second from bottom i.e.

    rsPCompanyContact.Open cmdTemp, , 1, 3

This is the list view from the generated code - the form view gives
exactly the same error.  In the list view however I see all of the
field names in the database table (SQL Server 6.5)

Any help will be appreciated

Terry Murphy

2. Linked Server Error on table with identity column

3. How can I read source code generated by wizard in VFP5

4. sql - query

5. Where to find information on Wizard-generated code

6. compiling sql on a PC

7. Form Wizard generated Code VFP3 ?

8. html table -> database

9. help--need to understand VFP3 Form Wizard generated code

10. Access: ConnectString generated by the connection wizard fails...

11. Simple SQL database access with c++ code - bare bones....don't want to use wizard

12. Access generic code built by wizard.

13. Generate MS-ACCESS table using SQL Script generated by SQL Server