Error in Wizard generated code

Error in Wizard generated code

Post by Terr » Thu, 23 Jul 1998 04:00:00



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

 
 
 

1. Accessing wizard generated code

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.

2. Oncheck -pc: Index record size = 2048

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

4. Compress from Ingres

5. Where to find information on Wizard-generated code

6. MD-PICK Job Opportunities

7. Form Wizard generated Code VFP3 ?

8. Creating Statistics

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

10. Error code 183 when running the Cluster Wizard

11. Data Form Wizard Code Error

12. Application wizard fails - Error Code 90?

13. Run-Time Error -2177221499 (80040005) Provider generated code execution exceptio