Thanks for your feedback
2 Questions
1. The code I have works even if a quote exists, I've tested it and it correctly identifies that the name exists
2. Is it not better to use direct sql statements from code (if you can) to ensure the program runs faster
e.g.
"Delete * from tblMain where ID...
Yes I agree, got confused while trying to figure this out. When I used parameters it works fine. I created a global function to fix any field that has a quote, then pass that “Fixed” value to the stored procedure as a parameter.
Here is the working example I used to ensure the name is not...
Problem above cant use like
but SQL has built in functions
String of ? 128 characters
QUOTENAME(@variable, '''')
String of > 128 characters
REPLACE(@variable,'''', '''''')
It took me ages to figure this one so I said i would share. Just a note its much better to avoid using sql directly from asp e.g. “select * from table 1 where name =’” & name & ‘” or “insert into table1 (name) values (‘” & name & “’). User Stored procedures and parameters
Problem
When passing a...
I deployed the site to Test Web Server 2003 IIS 6.0. However when I try open excel through the web page I get this (in event viewer). Note all works fine on development machine.
"The machine-default permission settings do not grant Local Activation permission for the COM Server application with...
It seems to be a bug in VWD 2005, as the table in question had 18 records but when I removed most of them the form started working again. I decided to use a gridview instead of a formview.
I have a webpage with a filter invoked by a javascript function -
<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() !=...
I have a webpage with a filter invoked by a javascript function -
<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() !=...
If a session value is true how to disable the entire delete button on the gridview.
e.g.
If session("AllowDeletes") = false then
me.gridview1.Allowdelete = false
End if
Thanks!
Hi,
I have an access program that 6 people use. However when 2 users open a form and click on a column and sort it sorts fine but when they close the form access crashes and asks to "send or don’t send" standard Microsoft reporting error. It works fine on the other 4 PCs. I reinstalled access...
Yep that was it, a trigger for each update inserted all rows from deleted - "select * from deleted" and inserts into the history table. I recently added a new field and never added it to the history table, thanks guys!
Hi,
If I try a simple updated e.g.
update referrals set notes = ''
I get the following error
Msg 121, Level 15, State 1
The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.
If I try a similar...
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.