**Apologies for double posting - just noticed I neglected to add a subject.

I need some help with this from some of you SQL gurus.

Here's a simple look up function (Partner_get_name) that uses SQL:

If ($partner_id>0)

If ([PARTNERS]ID#$partner_id)

Begin SQL

SELECT

Name_dba,

Name_display,

Name1_first,

Name1_middle,

Name1_last,

Name2_first,

Name2_middle,

Name2_last,

Type_Entity,

__ROW_ID


FROM PARTNERS

WHERE PARTNERS.ID <http://partners.id/> = :$partner_id


INTO

:$dba,

:$display,

:$n1_first,

:$n1_middle,

:$n1_last,

:$n2_first,

:$n2_middle,

:$n2_last,

:$entity,

:$recNum ;

End SQL . <= Line 51

​End if

End if​

​I've trimmed out the declarations and such for clarity and because I don't
think they are the issue. This is a method that gets called a lot. I dare
say several hundred times a day, probably more. But I keep seeing 1 or 2
errors. Here's a sample error report:

​Partner_get_name :
[db engine] Invalid table number requested by a Plug-In
  Error #   -1
  Line  #   51
  Process    :11 [ORDER_EDIT_RECORD]_ORDERS_124045
  Environment:[RM C]
  Session:
{"id":32044,"userName":"***","4dUser":"***","dbUser":-26,"
userId":4048,"machine":"***","machineName":"***_sched","partnerId":130646,"
boundPartnerId":101,"boundVendorId":101,"salesRepId":4177,"registerId":
"***_32044"}
  Error Stack:
    1002 : SQCO; Failed to connect to the remote server.
    1009 : SQLS; Remote SQL Server is not available.


There's nothing in the info from 4D that helps me. The table is clearly
valid. But I'm not entirely clear what the SQL errors are trying to tell
me. I've attempted to recreate the error by feeding the method various
levels of junk but I can't get it to barf.

Any ideas?

-- 
Kirk Brooks
San Francisco, CA
=======================
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to