473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Unable delete the data if it has space in between

kirubagari
158 100+
Hi Experts,
If i want to delete a data ,lets say RayMond Roy the code that i developed have bugs to delete that.Without space i can able to delete without any problem.Please help

Expand|Select|Wrap|Line Numbers
  1.       response.write "<td align=center><img border=0 src=images/delete.gif alt=Delete onmouseover=this.style.cursor='hand' onmouseout=this.style.cursor='default' onclick=getcell('d','" & rsct("ID") & "','" & rsct("VALUE") & "');>"
  2.  
  3.  
  4. if operation = "d" then
  5.           cn.execute("delete from table where ID = " & detail) %>
  6.             <script languange="javascript">
  7.             document.operation.submit();
  8.         </script>    <%
  9. end if
Aug 16 '12 #1
5 1880
ariful alam
185 100+
you should use (') single quote in both side of variable details like
Expand|Select|Wrap|Line Numbers
  1. cn.execute("delete from table where ID = '" & detail & "'") %>
Hope works for you. :)
Aug 16 '12 #2
PsychoCoder
465 Expert Mod 256MB
You dont need 's if the variable type is integer
Aug 17 '12 #3
debasisdas
8,127 Expert 4TB
As already suggested use single quotes on both the sides and trim the values before assigning to the variable if the variable is a string type. If it is a number type, you will not have any issue.
Aug 17 '12 #4
kirubagari
158 100+
Hi All,

Still having issue.
Please help.Unable delete the data.The data type is Varchar
Aug 17 '12 #5
Rabbit
12,516 Expert Mod 8TB
Use the single quotes as suggested. If you are still having a problem, you need to show us the new code.
Aug 17 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Konstantin Kosinsky795314850 | last post by:
I need lines below and above image. I used: <fo:block border-bottom="0.003in solid black" padding-before="0in" padding-top="0in" padding-start="0in" padding-bottom="0in" padding-after="0in"...
8
by: deepak datta | last post by:
Hello Gurus, please help suggest how I can remove the space between the top banner image & the rest of the page in: http://www.naturerugs.com/affiliate/default.asp I have tried numerous...
2
by: Peter CCH | last post by:
I encounter one weird problem, I have a database with around 7 GB ... when I delete a bunch of data from it, it suppose to reduce the database file size, but weirdly, the file size increase to 8...
1
by: Paolo | last post by:
Frinds, I am creating a form which exports and prints data to a Word file named FORM1. This word file has some fields which I have bookmarked and one of its fields is named NAME. The code that...
2
by: panorris | last post by:
I am an infrequent user of Access and have a problem which I hope someone may be able to help me with. I have a text field in a database which contains UK postcodes similar to EH4 7TY or DN10 9IU....
3
by: Jordan S | last post by:
I have been using the old HTML unordered list in order to have bullet-point lists. But they don't look good because there is no white space between each list item. <UL> <LI>List Item Here...
5
by: dw | last post by:
hello - first, let me state that i am an Asp.Net rookie. here is the situation: i have a page that looks good in the vs.net designer, but when the page renders there are extra amounts...
8
by: maroger | last post by:
I'm sure this is a common issue, but I haven't come across anything that works for me thusfar. I am trying to fix my header, which works fine in firefox but has extra space in IE. Here are...
2
by: fusillator | last post by:
I would like to create new option with more than one space as text in a select element, is it possible? I tried this statements: var selT=document.getElementById('SelectObj'); selT.add(new...
8
by: removeps-groups | last post by:
Is there any way to control the space between top of browser or frame and document body? What I have is this: There is a simple file test1.html, and file test.html that displays test1.html in an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.