Skip to Content
0
Former Member
Jun 09, 2008 at 03:25 PM

Using RecordSelect.DoQuery with a UDO ...

35 Views

Got a small problem .. Trying to write a query over a UDO , code shown below ..


string copiedFrom = "99" ; // Just a sample  .. 

string queryString = "Select * from @My_File where DocEntry = " + copiedFrom;

rsCopiedFrom.DoQuery(queryString);

The DoQuery throws an exception -

+ $exception {"1). [Microsoft][SQL Native Client][SQL Server]Must declare the table variable \"@My_File\".\n2). [Microsoft][SQL Native Client][SQL Server]Statement(s) could not be prepared.\n"} System.Exception {System.Runtime.InteropServices.COMException}

Anyone shed any light ?