Showing posts with label engine. Show all posts
Showing posts with label engine. Show all posts

Monday, March 26, 2012

Passing in query paramater values through WebUserControls

Hi,

I don't want to pass in parameter values in the url to get a certain record from my database (for a better search engine result) so instead i'm using webuser controls (this is amust) with Public Values that should be read by the SqlDataSource. So in the page that contains the usercontrol there is something like:

UserControl.Value = "myvalue"

Now I want the SqlDataSource in the usercontrol to read this value and pass it into a query (in the parameter of the WHERE statement, eg.: @.recordID = myvalue).

Thanks in advance!

Hi,

You should create a public attribute in your user control(eg. below). When using the user control, regard it as a input parameter. In this way ,the parameter can be passed to the SqlDataSource in the user control.

private string _para1;public string para1{get{return _para1; }set{ _para1=value; }}
Thanks.

Wednesday, March 7, 2012

Pass Through query with property ReturnsRecords set to FALSE

Whenever I try to make a pass through query in Access 2002 for Oracle
sql server I get this fault
"The microsof Jet engine cannot find table or query" and then mentions
the connection string as table or query name.
The query is not supposed to return records, because it is DROP TABLE
<table_name>
When I run the syntax in Oracle SQL plus it works fine.
If I set the ReturnRecords property to TRUE it correctly says that the
query doesn't return records, but the query is correctly executed.
Here the problem is, it stops the Macro I use to run a whole serie of
pass throughs.
Anyone got a solution? I have the latest jet engine service pack
installed but no improvement.
DiPass-through queries pass SQL statements directly to the data source
-- they are not parsed by Access, Jet or ODBC. I'm not sure why you're
getting the Jet engine error message, or where the problem lies. You
might want to consider kicking off your pass-through queries from VBA
instead of from macros. That way you can get more information through
structured error handling, which macros lack. You can create or modfiy
pass-through queries by coding to the DAO.QueryDef object.
--Mary
On 24 Aug 2006 01:34:40 -0700, "Di" <dianne.timmerman@.gmail.com>
wrote:

>Whenever I try to make a pass through query in Access 2002 for Oracle
>sql server I get this fault
>"The microsof Jet engine cannot find table or query" and then mentions
>the connection string as table or query name.
>The query is not supposed to return records, because it is DROP TABLE
><table_name>
>When I run the syntax in Oracle SQL plus it works fine.
>If I set the ReturnRecords property to TRUE it correctly says that the
>query doesn't return records, but the query is correctly executed.
>Here the problem is, it stops the Macro I use to run a whole serie of
>pass throughs.
>Anyone got a solution? I have the latest jet engine service pack
>installed but no improvement.
>Di