Query with Parameter

I am trying to use values from query as keys for another query. I have
one main form with tabforms on it. On the main form I have a main query,
query_1. On the tabform I have a query, query_2.

Each record in query_1 will have multiple corresponding records in
query_2. Each time I move the cursor in query_1 I want query_2 to
re-execute and produce a new recordset. I will do this by passing values
from query_1 to query_2 as parameters. I can get the values from query_1
but I am having trouble getting query_2 to execute with the parameters.
I am using SetParameter( ) but to no avail. Could someone please tell me
where I need to put my code in order to get query_2 to execute correctly
the first time?

TIA
Nate Kane
natekane@gte.net

0
Nate
11/5/1997 9:22:30 PM
sybase.power++.database 932 articles. 0 followers. Follow

2 Replies
392 Views

Similar Articles

[PageSpeed] 41

One way to solve this problem would be to create a Visual class, make it
global, and then place all of your transactions and queries on it. Now
since it is global, everyone has access to them all. This is how I
accomplish what you are trying to do.

I can give an example if you wish.


0
Michael
11/5/1997 10:14:45 PM
Nate,

  Like they say, "A picture is worth a thousand words."  In this case an
example.  The best one I can think of is for you to create a test
project and add a database dialog using the form wizard.  Go through the
steps and use a Master/Detail style.  Let Power++ generate the code then
use the editor to see what events were created etc...  If it works for
them, it should work for you.

Glenn

Nate Kane wrote:
> 
> I am trying to use values from query as keys for another query. I have
> one main form with tabforms on it. On the main form I have a main query,
> query_1. On the tabform I have a query, query_2.
> 
> Each record in query_1 will have multiple corresponding records in
> query_2. Each time I move the cursor in query_1 I want query_2 to
> re-execute and produce a new recordset. I will do this by passing values
> from query_1 to query_2 as parameters. I can get the values from query_1
> but I am having trouble getting query_2 to execute with the parameters.
> I am using SetParameter( ) but to no avail. Could someone please tell me
> where I need to put my code in order to get query_2 to execute correctly
> the first time?
> 
> TIA
> Nate Kane
> natekane@gte.net
0
Glenn
11/5/1997 11:00:31 PM
Reply:

Similar Artilces:

Parameter query Access database
Hihow can I write the follow syntax, where if I have a parameter string, i find all the words contain that string.Better a example: the parameter string = "ho" the words that i find: "home", "house" etc....The query is on Access database. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"SelectCommand="SELECT [id], [nomerist], [tipologia], [citta] FROM [ristoranti] WHERE...

Using parameters in a sql query to an oracle database.
Where can I find documentation on how to use parameters in a sql statment against oracle. Example. SELECT    'Test' From table_name where customer_number = :num.   I believe :num is the parameter specification. All examples seem to be in Sql Server. Any oracel examples using the Reporting Services. Thanks     You need to setup aliased parameters for the oracle connection.    In the datasource for your dataset,  there should be a parameters tab.   create your :num and tie it to the report parameter.   &...

Parameter query
Hi: I am trying to build maste/detail page.  1.  I have on my page drop down control based on sqldata sources with the concataned fields as follows:   SELECT DISTINCT LastName + ' ' + FirstName AS Expr1 FROM dbo.Table1 It displays First Name space and Last name in the box and works fine. 2. I placed on my form a grIdview In data source I am trying to use parameter filter in SQL select query and the same query as for drop down as follows: SELECT     LastName + ' ' + SiteFirstName AS Expr1, field1, field2, etc.........

Parameter query won't work in aspx page as in database
I have the following criteria for one field of data in an access 2000 query: Like [Enter Beginning Letter Of Author's Last Name:] & "*" The result I am looking for with this parameter is to enter a single letter and get back all the author names that begin with that letter. This works in the database, but when I attempt to use this parameter query in an aspx page, I get no records returned. I have already tested this query without a parameter to see if I get any records returned to the database and aspx page. This was successful. I have also tested this query with the...

Using VB to query SQL Server database--Need help setting parameters
Greetings, I am preparing a web app that returns totals of shipping costs for several categories of shipments. I will be using two TextBox controls where users will enter start and end dates. When the user clicks the submit button, the form refreshes to reveal the results (a series of labels tied to various queries). I have spent the last few days researching ways to accomplish this and have gotten as far as the following code, which all seems to work. Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System....

LDAP queries linked to SQL database queries
Hi, I am wondering whether it is common practice to use the AD domain users information as a link table for user information in database queries. My first thought is that it would be too slow since it can potentially query the AD many times depending on the number of records returned. Any insight is appreciated, sivilianMy Weblogs...

DNN, DNN Database, and Company Database
So I am getting aquainted with DNN...I made my first module and successfully brought it into DotNetNuke.  The module is a Datagrid that displays data from ALL customers. BUT!!!  I only want data to be displayed pertaining to the customer who is logged in. I would like to go about this by assigning the relevent AcctNo to each specified User (a new AcctNo field could be added to the appropriate users table in the DNN database).  The User's assigned AcctNo would match the AcctNo of applicable records in the underlying table of the Datagrid originating from my company ...

Select Where Database Query Using a Query String Variable
Hi, i'm using a variable called ID which is getting passed through a querystring, it is converted into an integer and i am trying to use it within a select statement. Dim ID As String = Request.QueryString("DVD_ID") Dim dvdid as Integer = Convert.ToInt32(ID) For some reason it just refuses to work, my code is like this below: ("Select * From DVDs Where DVD_ID='+dvdid'", MyConnection) When i process the code, i get "Data type mismatch in criteria expression", but when change it to for example, the value  to 2, it works perfectly! I am assuming my syntax is wrong, i'm using...

Linking Tables From Different Databases Or Querying From Multiple Databases
Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query.    Yes, you just need to fully qualify the tables, using the database names: select t1.field1, t2.field2 from Database1..table1 t1 inner join Database2..table2 t2 on t1.keyfield = t2.keyfieldMark DoyleDoyle ITSwww.doyleits.com SELECT t1.customer.* , t2.email.* FRO...

C# Ado.net Sql query parameter query
Hi All, I'm trying to pass in a parameter value from an array in a loop that is used in a sql query and the results are populated to an xml file. The trouble is that I'm only getting the colums values in the outputted xml file. So I feel that the paramter is not being read. So can anyone help as I'm really stuck on this one. The code is as follows : public void DisplayUserInfo() { ArrayList UserIdArrayList = IdentifyUserID(); foreach(string ShowUserIDString in UserIdArrayList) { try { SqlConnection SqlConn = new SqlConnection(DBConnString)...

How to Query A Query
I have been trying to build a crosstab report that reports everydate within a selected range across the top and specific row information. 7/1 7/2 7/3 . . . Name Detail1 Detail2 Detail3 Name Detail1 What I get as output is only the dates that contain information in the rows. I can get the information I need by using a query within a query (nested). Can a nested query be done in Informaker 5? What about version 6 or 7? Thanks for your help Convert your SQL to syntax, and you can write anything you want. So if your DB support...

Querying a database
Hello everyone!! Does any of you know how I can query a database? I have a database on a windows machine and I want to be able to perform some simple queries to it using perl. Can anyone help? Thank you in advance. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Buy and read "Programming the Perl DBI". -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and...

How to query a query...
I'm working on converting an Access DB that I created into an ASP.NET application (and attempting to learn ASP at the same time...). One of my queries was very complex and required running a different query first, and then working off of that one. Any suggestions on the best way to do this in ASP? The following is a sample of code I'm using so you can see the type of data-binding I'm using. Thanks for the help! myConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " +"Data Source=" + Server.MapPath("/EquipmentCheckout.mdb")) strS...

Query about Queries
Hello all, As a relatively new user to Sybase I am hoping someone can point me in the right direction. We are getting ready to go live with our database and I am wondering what types of queries I should be running for system performance purposes. If anyone has any suggestions they would be more than appreciated. Thanks in advance, Jerry ...

query parameter
I have to create a stored procedure where the criteria is: "All", specific value and, all except one value so far this is what I have:@Status varchar (50)  -- as parameter from a dropdown boxDECLARE @NewStatus varchar(50) SET @NewStatus = CASE WHEN @Status ='All' AND @Status <> 'All but closed' THEN '%' WHEN @Status <>'All' AND @Status <> 'All but closed' THEN @Status END and in the stored procedure .......... WHERE Status like @NewStatus  I am a little confused as to how could I return all values except those that have  the ...

Web resources about - Query with Parameter - sybase.power++.database

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google Webmaster Tools Parameter Handling - Flickr - Photo Sharing!
You aren't signed in Sign In Help Home The Tour Sign Up Explore Explore Home Last 7 Days Interesting Popular Tags Calendar Most Recent Uploads ...

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 12/8/2015 4:44:17 PM