THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE
<%
sql01 = "SELECT COUNT(*) AS reccount FROM Equipmenttbl "
sql01 = sql01 & "WHERE Equipmenttbl.Gr antID = " & GrantID
'Response.Write sql01 & "<br>"
'Response.End
i = 0
sql01 = "SELECT equipmentTbl.* FROM EquipmentTbl "
sql01 = sql01 & "WHERE EquipmentTbl.Gr antID = " & GrantID
response.write "SELECT SQL:" & sql01
'response.end
rstemp.open sql01
'set rstemp=conntemp .execute(sql01)
Do until rstemp.eof
i = i + 1
response.write "<TR>" & vbCRLF
strLink = "<TD WIDTH=1% ><INPUT TYPE='HIDDEN' NAME='Equipment ID_" & i &
"' VALUE=" & rstemp("Equipme ntID") & "></TD>" & vbCRLF
response.write strLink & vbCRLF
if session("locked ")<>"Y" then
strLink = "<TD WIDTH=1% ><A TITLE='Click here to delete line'
HREF='ConfirmDe leteEquipmentLi ne.asp?Equipmen tID=" & rstemp("Equipme ntID") &
"'>Delete</A></TD>" & vbCRLF
response.write strLink & vbCRLF
else
strLink = "<TD WIDTH=1% ></A></TD>" & vbCRLF
response.write strLink & vbCRLF
end if
strLink = "<TD WIDTH=10% ALIGN=LEFT><INP UT TYPE='text' SIZE=10
NAME='serialnum _"& i & "' VALUE='" & rstemp("SerialN umber") & "'></TD>" &
vbCRLF
response.write strLink & vbCRLF
strLink = "<TD WIDTH=40% ALIGN=LEFT><INP UT TYPE='text' SIZE=45
NAME='Desc_"& i & "' VALUE='" & rstemp("Descrip tion") & "'></TD>" & vbCRLF
response.write strLink & vbCRLF
strLink = "<TD WIDTH=10% ALIGN=LEFT><INP UT TYPE='text' SIZE=28
NAME='Location_ " & i & "' VALUE='" & rstemp("Locatio n") & "'></TD>" & vbCRLF
response.write strLink & vbCRLF
response.write rstemp("Locatio n") & "<br>"
strLink = "<TD WIDTH=10% ALIGN=RIGHT><IN PUT TYPE='text' SIZE=12
NAME='Cost_" & i & "' VALUE='" & rstemp("Cost") & "' style='text-align:
right;'></TD>" & vbCRLF
response.write strLink & vbCRLF
strLink = "<TD WIDTH=20% ALIGN=CENTER><I NPUT TYPE='text' SIZE=1
NAME='Expmonth_ " & i & "'VALUE='" & month(rstemp("D ateAcquired")) & "'>/
<INPUT TYPE='text' SIZE=1 NAME='ExpDay_" & i & "'VALUE='" &
day(rstemp("Dat eAcquired")) & "'>/ <INPUT TYPE='text' SIZE=2 NAME='Expyear_"
& i & "'VALUE='" & year(rstemp("Da teAcquired")) & "'></TD>" & vbCRLF
'************** *
response.write strLink & vbCRLF
response.write "</TR>" & vbCRLF
totalcost=total cost+rstemp("Co st")
'save the check box value and Financial Officers name. Should be the
same on
'all records as it will get updated each time the UPDATE button is
clicked.
'Check box and name are redundant but this is the way it was originally
set up
'Decided to go with the flow rather than trying to save these values in
the
'GrantTBL so they are not redundant.
ICertify = rstemp("ICertif y")
FinancialOffice r = rstemp("Financi alOfficer")
rstemp.movenext
loop
rstemp.close
%>
</TR>
In the above code which is a input screen (as well as display screen) all
the equipment rows of a particular GrantId is captured
from the above recordset and is displayed in a table format by the above
loop. The problem is that for the values
of location for various rows, if there is a single quote in the row, then
only part of the value is captured in the
location column of this generated table.
I have added a response.write rstemp("Locatio n") & "<br>" statement to see
the values that are retrieved
from the backend table corresponding to the locaion field.In the present
scenario the following was the result i.e. here we can see that the single
quotes
are retrieved as is. The results are the following:
Conference Room's Cabinet
Server Rooom
Don's Room
Server Room
However, in the asp generated table for the location column the values are
as follows:
Conference Room
Server Rooom
Don
Server Room
Thus all character including and after the single quote(') is getting
truncated.
I have no idea why this truncation is happening when the rows are being
dynamically formed in the asp table
but retrieves the whole value by issusing a response.write statement. And
what is the resolution for this problem so
that the location field in the generated asp table shows data without any
truncation.
Any help is appreciated.
Thanks in advance. 4 2240
This has something to do with the fact that SQL-statements use the
'-character. I think the solution was something with putting the ' in
between two ", so it will be something like "'" (or " ' " with spaces).
When a '-character is used, you effectively tell the server the
SQL-string ends there.
I'm probably a bit vague but thats because its been some time since I
had sort of the same problem ;-)
Thanks for your help Alvan. I appreciate it. However, it did not help me
resolve this problem. Hence I had to post this message again to see if
someone has some suggestion fo resolution of this problem.
"Avlan" wrote: This has something to do with the fact that SQL-statements use the '-character. I think the solution was something with putting the ' in between two ", so it will be something like "'" (or " ' " with spaces).
When a '-character is used, you effectively tell the server the SQL-string ends there.
I'm probably a bit vague but thats because its been some time since I had sort of the same problem ;-)
Avlan wrote: This has something to do with the fact that SQL-statements use the '-character. I think the solution was something with putting the ' in between two ", so it will be something like "'" (or " ' " with spaces).
When a '-character is used, you effectively tell the server the SQL-string ends there.
I'm probably a bit vague but thats because its been some time since I had sort of the same problem ;-)
No - it's HTML 101.
The OP was using a single quote to delimit his attribute values. This
is OK if they contain double quotes, but when the browser reaches the
single quote in the value, it figures it has reached the end of the
value, so stops writing.
HTML specification is that you use doublequotes for attribute values.
In XHTML, it's mandatory.
/P.
Paxton wrote: Avlan wrote: This has something to do with the fact that SQL-statements use the '-character. I think the solution was something with putting the ' in between two ", so it will be something like "'" (or " ' " with spaces).
When a '-character is used, you effectively tell the server the SQL-string ends there.
I'm probably a bit vague but thats because its been some time since I had sort of the same problem ;-)
No - it's HTML 101.
The OP was using a single quote to delimit his attribute values. This is OK if they contain double quotes, but when the browser reaches the single quote in the value, it figures it has reached the end of the value, so stops writing.
HTML specification is that you use doublequotes for attribute values. In XHTML, it's mandatory.
/P.
Oops. Meant to say HTML *recommendation *, not specification.
/P. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: James Johnson |
last post by:
All,
I'm building a member signup form. Fields that contain more than one word
are being truncated when being inserted into the MySQL table.
I'm using this code that I got from one of my PHP books.
$as_addr1 = addslashes($_POST);$tr_addr1 = trim($as_addr1);
So, if I post "1122 Boogie St." it gets inserted as "1122". If I remove the
|
by: bhieb |
last post by:
Alright this is a new one to me. I have linked a table using ODBC to
our AS400. When I either open it directly or query it I get the
incorrect values for several fields. For example the query on the
linked table returns these 5 records...
CUCUST CUALPH
0188 RITA
0188 RITA
0188 RITA
0188 RITA
|
by: charles.amith |
last post by:
I have 2 tables: LOCATION and ELEVATION
In location, I would like to find the record with the max value for
field: DATE1
In elevation, I would like to find the record with the max value for
field: DATE2
I would like to join the 2 tables using the common field: PID , and
also query a field called NOTE from the "LOCATION" table.
|
by: Todd Perkins |
last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually
rely on google. So I hope I have enough info contained. Thank you in
advance for any help!
Problem:
I am getting this error when I try to pull up my edit page to display the
current database information in the form, and then edit it on click:
|
by: bunty.gopal |
last post by:
I am trying to use the PreparedStatement's addBatch to load data in an
ETL-like process into a table. There is a single prepared statement.
The parameters are set on it and prepStmt.addBatch() is called. Then
the next iteration of setting the params and adding to batch begins.
Finally after setting the batch of 2 to 2000 rows, the
prepStmt.executeBatch() is called.
If the last row contains a null value for a particular DECIMAL field,...
| |
by: Jack |
last post by:
Since,
I have not got some desired advise, I am reposting this for some
asnwer/valuable suggestion. Thanks.
THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE
<%
sql01 = "SELECT COUNT(*) AS reccount FROM Equipmenttbl "
sql01 = sql01 & "WHERE Equipmenttbl.GrantID = " & GrantID
|
by: bunty.gopal |
last post by:
This is the solution to the issue in the subject, question itself was
posted in a previous thread long back.
Use the latest DB2 db2cc.jar fixpack on the client, or add
"deferPrepares=false" to the connection string when opening the
connection (or connection pool properties, if deployed on a server like
weblogic). The issue can be resolved using either of these options.
Gopal
|
by: crayfiss |
last post by:
Hi, firstly I am a total freshie in all this. From what I have gathered on the web and this forum, I finally managed to get my form up.
I have a set of radio buttons with values to it and a select box with values too. Depending on the options selected from the two, the values will be calculated and displayed. everything worked fine with the calculation and im getting the right amount totalled up.
I only have one issue, whenever the radio...
|
by: raghuvendra |
last post by:
Hi
I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button.
All these are aligned in a row. And Each Category Name has its corresponding Category order, Input field and a submit button.
The Category name is being fetched from the oracle db along with the corresponding Category order.
In the corresponding input field (text box) the user enters a new category order which gets stored in...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |