Menu

#2 Is there anyway to do this more efficiently?

open
nobody
None
5
2012-11-20
2012-11-20
Alex
No

I am attempting to send a table valued parameter to the server as an array using table type feature. I am currently sending something like the referenced. Is there a better way of doing this with the PHP plugin?

SQL:

Set NoCount On; DECLARE @widget type_namevaluepair_list; INSERT INTO @widget (refname,refvalue) VALUES (0x6675697469746c65,0x546573745f5445),(0x667569736574,0x6261736963),(0x66756974797065,0x74657874),(0x66756976616c6964,''),(0x66756964656661756c74,''),(0x66756972657175697265,'0'),(0x66756964697361626c65,'0'),(0x6661727264617461,''),(0x6661727274797065,''),(0x6661727264656c6d,''),(0x66626e646e616d65,0x5465737431),(0x66626e6474797065,0x5350),(0x66626e646f726472,'1'); EXECUTE temp.dbo.test @widget;

Discussion

  • Robert Twitty

    Robert Twitty - 2012-11-20

    There is not a better way other than by submission of SQL statements.

     
  • Alex

    Alex - 2012-11-20

    Is it possible to prepare a statement but not send it? I am hex packing the insert statements because of not having the ability to deal with quotes or SQL injection

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.