I need to keep similar tables in two different databases in synch. This is what I want to do:
-Any column update to database1.mytable should trigger the same column update to database2.mytable.
-Any column update to database2.mytable should trigger the same column update to database1.mytable...
How would we write code to parse statements to account for various user entered search criteria, similar to the searches you can do with Google?
For example:
If the search is for a Title and the user enters: "Component Developer" Magazine, how would we write the sql code to search for
titles...
I have a javascript function that is called when I click my server-side submit button. I want to validate that one of my labels is not empty before allowing a submit.
I cannot figure out how to access the value stored in myLabel.text.
For hidden form variables I use the following syntax in...
I have a textbox, txtName, runat=server. When the submit button is clicked, I want to change the value of txtName in the code-behind page and then submit the changed form variable to another page. It seems that the value of txtName must also be changed client-side in order for the value to...
I used to use ColdFusion's <cfabort> tag to end processing of a web page if a certain condition was true. For example, if the user came from the wrong page, I would display an error and then use <cfabort> to prevent the processing of the remainder of the page.
I have a datagrid with an arraylist as the datasource. I added an Edit, Update, Cancel button column and coded the EditCommand event handler. When I click on the Edit button, the datagrid disappears. Have I lost my datasource during postbacks or something? Here's my code:
private void...
I know that a string variable defaults to null and an integer defaults to zero if you don't assign values, but what is the default for a datetime variable? I need to check the value to see if it's 'blank' so that I know to insert dbnull.value into the database. Currently, my workaround for a...
I am using system.web.mail to send an email in asp.net (c#). I would like to format the body of the email message so that it includes an indentation on new lines. Can someone give me an example of how to do this? Thanks!
Here's my code so far:
MailMessage mail = new MailMessage();
mail.To =...
Hi,
I'd like to store the contents of a listbox in a session variable. No error is produced from the assignment statement, but I cannot retrieve the items from the session variable afterwards. Thanks.
//The following code is in page load...
if(Session["lstGrpMembers"] == null)
{
//set the...
I added template columns to my datagrid in html view and want to disable the bound checkboxes (I still want them to be visible). I looked at the controls collection but can't seem to figure this out.
<asp:datagrid id="dgGroupMembers" runat="server" AutoGenerateColumns="False"...
Hi,
I'm new to .net and I want to accomplish something I used to do in javascript...When a user clicks on a selection from a dropdownlist, I want to open a different page in a new window (while keeping the original window open). The value of the selected option must be passed to the new page...
Hi, I'm new to .net and I'm trying to figure out how to access the value of a checkbox within a datagrid. The datasource for the datagrid is an arraylist of groupmember objects. The code below produces a value of 'true' for variable isReviewer even if the checkbox is unchecked.
Here's what I...
Hi,
I would like to build a where clause based upon parameters passed in to a stored procedure. Basically, each parameter corresponds to a column, and if a parameter is null or an empty string, I do not want it considered in the where clause (i.e. I want all values returned for its...
Hi,
I'm trying to use a 'between' condition within a CASE statement, but I get an error. I don't want to have to repeat the CASE expression for each 'When' because it's pretty long. Anyway, here's what I want to do:
CASE myVeryComplexSubqueryThatReturnsAnInteger
WHEN BETWEEN 1 AND 5...
CFMX 6.1,Win2k,IIS5
When using cftransaction tags, I receive the following warning in the CF application.log file: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
It is only a warning and does not...
I am trying to open an Access 2002 db over my network and get an error stating that it cannot open the file because it is located outside your intranet or an untrusted site. Something about security. It says to copy the file to the local computer (that worked, but I want to be able to open it...
I have a comma-delimited list of email addresses and am trying to use CFMAIL to send an email to each recipient in the list. It works fine IF all addresses are deliverable BUT if one address in the 'To' list is undeliverable, none of them get delivered. Any ideas why this would happen?
For...
I would like to pass a list of values for use in a
'WHERE IN (x,y,z)' clause w/in my stored procedure.
Here's the concept I'm looking for, but I have no idea if it can be done or how to do it:
CREATE PROCEDURE spMySP @myList varchar(50) AS
SELECT *
FROM myTable
WHERE myColumn IN (@myList)...
Hi,
I've checked the MS Knowledgebase for a bug, but cannot seem to find the problem...Below is a query that succeeds with certain ID's and fails (error 1203) with others. Note that it succeeds if I remove 'Top 1' from the select statement. Any idea what the problem might be? We're running...
This is my first time using cfstoredproc and I'm having a bit of difficulty...I tried using the dbvarname attribute to pass my variables into my sql2000 stored procedure, but it returned no records and a status code of 0. But when I rearranged my <cfprocparam>'s so that the order of the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.