Query parameters


I have found a problem with the customizable queries.
In the function SaveQuery in the file AccessDataAccessLayer.cs, there is a foreach loop to go through each query clause and add them in the database.
However, if for example I create a query with two clauses, the boolean operator for the second clause will be the same of the one for the first clause. It seems that the new value is not set properly in the parameter.
Also, the length of the fieldname of the first clause is applied to the fieldname of the second clause and if it is longer, the fieldname is cut, causing an error in the query:for example if the fieldname of clause 1 is IssueStatusId and the fieldname of clause 2 is IssueAssignedId, IssueAssigned will be saved.
Thanks in advance for you feedback
2/18/2005 12:42:16 PM
asp.net.issue-tracker-kit 722 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 30

This error seems to occur because the OleDBCOmmand is not updated correctly.

My solution: Create a new OleDBCOmmand in the foreach loop of  SaveQuery().


Marco Zierl
senior .NET developer

----- code start ----

foreach (QueryClause clause in queryClauses)


// Create Save Query Clause Command

OleDbCommand cmdClause =

new OleDbCommand();

cmdClause.Connection = cn;

cmdClause.Parameters.Add( "@QueryId", OleDbType.Integer);

cmdClause.Parameters.Add( "@BooleanOperator", OleDbType.VarWChar, 50);

cmdClause.Parameters.Add( "@FieldName", OleDbType.VarWChar, 50);

cmdClause.Parameters.Add( "@ComparisonOperator", OleDbType.VarWChar, 50);

cmdClause.Parameters.Add( "@FieldValue", OleDbType.VarWChar, 50);

cmdClause.Parameters.Add( "@DataType", OleDbType.Integer);

SetCommandType(cmdClause, CommandType.StoredProcedure, SP_QUERY_SAVEQUERYCLAUSE);

cmdClause.Parameters["@QueryId"].Value = queryId;

cmdClause.Parameters["@BooleanOperator"].Value = clause.BooleanOperator;

cmdClause.Parameters["@FieldName"].Value = clause.FieldName;

cmdClause.Parameters["@ComparisonOperator"].Value = clause.ComparisonOperator;

cmdClause.Parameters["@FieldValue"].Value = clause.FieldValue;

cmdClause.Parameters["@DataType"].Value = clause.DataType;



5/22/2006 1:45:28 PM

Similar Artilces:

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)...

Issue with parameter query
I am having an issue with a parameter query in an ASP .NET form objOleDbConn = New OleDbConnection(ConfigurationSettings.AppSettings("DsnMSAccess") & Server.MapPath(ConfigurationSettings.AppSettings("DBName"))) dim strSql As String = "UPDATE DEPTS SET [dept_name]=@DeptName, [comments]=@Comments WHERE dept_id=" & grdDepts.DataKeys(e.Item.ItemIndex) objOleDbCmd = New OleDbCommand(strSql, objOleDbConn) objOleDbCmd.Parameters.Add("@DeptName", strDeptName) objOleDbCmd.Parameters.Add("@Comments", strComments) objOleDbC...

Issue Tracker Starter Kit.
To: The DNN Core Team I assume that you all have seen the new starter kit on ASP.NET, Issue Tracker. I've looked at it some this morning, and I looks like it may be a good fit to replace the GotDotNet Bug Tracker. Just thought I'd pass this along for your future discussions. DanDan Tindall Thanks, Dan. It does have our attention. We are acquainted with the project owner.Scott WillhiteIt is only with the heart that one can see rightly... what is essential is invisible to the eye. ~ Antoine de Saint-Exupéry...

Issue Tracker Starter Kit
I have recently downloaded and installed the Issue tracker Starter Kit on my machine which is running visual studio.net 2003 on XP Proffessional. When I attempt to run the app through internet explorer I get the following error message: Server Error in '/IssueTracker' Application. -------------------------------------------------------------------------------- At most one record can be returned by this subquery. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and ...

Issue Tracker Enhancements & Alternate Issue tracker BugNet
Hi, I would like to let everyone know about the recent release of the BugNet issue tracker (taken from the asp.net issue tracker).   This project certainly isn't new but has regained interest with myself lately.  Anyone looking for an alternate open source issue tracker should try it out.  Anyone wishing to help is welcome. The project can be found on sourceforge:  http://sourceforge.net/projects/bugnet thanks Is there online demo for this?  I am using the vb version but I am curious if you have done the enhancement to allow assigning issue ...

is there an "Issue Tracker" for the Issue Tracker? bugs list
like the titile .... is there a list of known bugs anywhere? I looked at a few posts but it could take a lot of time to check them all.... so far I have seen (and other have posted about) 1) forms that on submit return an empty page 2) the form /issues/issueslist.aspx dropdown combo boxes do not display correct list of items and need user selections to make them work right. 3) page with is good @ 100% inside browser but height is a bit to tall looks like its 100% + one scroll bar height. Feature request: Administarator should be able to set "default&quo...

VB.Net Release of Issue Tracker...
When the VB.Net release is available will I be able to seamlessly install it without losing all my current data. Hi doug72, Thanks for using the Issue Tracker! The VB.NET release will be functionally identical to the final C# release. I don't anticipate any changes to the database tables with the final release of the Issue Tracker, so there should not be any data loss. However, there will be some bug fixes to the stored procedures. The final release will not have a migration option. However, after you install it, you can copy the data from the BETA version over to the tables in ...

Download link for Issue Tracker Kit ..
What is the exact download link for the Issue Tracker Kit?  The link given in the Sticky post at the top of this forum (www.asp.net/starterkits) goes to an Atlas page! TIA http://www.asp.net/starterkits/downloadissuetracker.aspx?tabindex=0&tabid=1 HTH,RyanRyan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

Issue Tracker Starter Kit and DotNetNuke
Hi,I read somewhere the other day that someone had ported the issue tracker to DNN.  Does anyone know where I saw this or who is responsible.  Id like to catch up them soon.CheersPhilip Beadle (MVP, MCAD, MCT DotNetNuke Core Team) check out http://issuetracker.icpconline.com/ I'm in the midst of implementing it myself.  It's been workable, still a few things I need to work out....

migration issue tracker starter kit
This is not a commercial announce and I don't promote myself for consulting or similar jobs.It's possible migrate issue tracker starter kit fromMicrosoft visual 2002 to 2003 to 2005 to 2008?Consequentlyit's possible migrate it fromasp.net version 1.x to 2.0 ?In my experience the answer isyesso i confirm that everyone can make it (if I was able to do it...) What I have doneI used the C# version and this has an heavy impact Not is the same thing make it by the visual basic versionSome things are very easy by VB (single statement without term line, automatic correction etc.)other a...

white paper on issue tracker kit
Can anybody pl let me know , where to get white paper on the issue tracker kit . All other kits are having white paper , which details the code/database design in detail Bhat This question was asked in this forum before.  There is no official Microsoft white paper for Issue Tracker Starter Kit.  The site  http://issuetracker.icpconline.com/ may have some documentations that could help you start.  The available information are 1.  User guides2.  Database ER3.  FAQ4.  Enhancements Source Code To learn the architech of the kit, I would recommend...

errors on installing the issue tracker starter kit
I get this error message "System.Runtime.InteropServices.COMException (0x80005000): Unknown error (0x80005000) at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)" Does anyone know how i can install the issue tracker starter kit without any errors ?? I think I had the same problem first. Then I have install the Web Server. You find it on your Windows 2000 CD. Then you can install it, but then, when I want to luanch the Quick Start I received the next problem. I get the following line: <%@ Page Language="vb" CodeBehind="Default.aspx...

What is the link to download Issue Tracker Starter Kit?
I could not find the url to download the Issue Tracker Starter Kit. The link most often suggested on the web search results, http://www.asp.net/Default.aspx?tabindex=9&tabid=47, doesn't include this starter kit. Thanks It's buried a little. You do know this is a 1.1 kit right? (that's why it's buried) http://www.asp.net/downloads/archived/starter-kits/issue-tracker/ Yep, I found that after I posted the question. However thanks a lot for the info.  I have converted it into 2.0 without any major issues. Thanks ThirstyMind, what did you do to convert it i...

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.........

Time Tracker and Issue Tracker
Anyone given some thought regarding integrating time tracker and issue tracker? I have some mild interestGet ready to blast your energy levels into high gear with Sedgewick Energy Drink. High powered adaptogenic herbs mixed with potent levels of B-vitamins and...Please disregard the contents of this post. Once CSK 2.0 is released I was going to look into making some "professional modules" which included these. For the current CSK/GCN I don't have time - if I want the CSK 2.0 to move forward... ;)Keith 'StarPilot' BarrowsHome SIte | The Terran Institute | ASPInsidersA...

Web resources about - Query parameters - asp.net.issue-tracker-kit

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 3:04:43 PM