Hi,
I've saved data into the db by doing a replace() on single quote.
Right now on data display on a datagrid, it shows double single quote.
How do I make changes during run time of datagrid so that the double single quote will be replaced as single quote?
Pls advise.
Thanks 3 2737
Your best bet, especially to prevent SQL injection attacks, instead, would be to use Parameterized Queries.
Here's a 2 part tutorial on that subject: http://aspnet101.com/aspnet101/tutorials.aspx?id=1
David Wier
MVP/ASPInsider http://aspnet101.com http://aspexpress.com
"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message news:11******** *****@sp6iad.su perfeed.net...
Hi,
I've saved data into the db by doing a replace() on single quote.
Right now on data display on a datagrid, it shows double single quote.
How do I make changes during run time of datagrid so that the double single quote will be replaced as single quote?
Pls advise.
Thanks
On Apr 12, 1:10 pm, "Eric Layman" <namyalcire[at no spam]gmail.com>
wrote:
Hi,
I've saved data into the db by doing a replace() on single quote.
Right now on data display on a datagrid, it shows double single quote.
How do I make changes during run time of datagrid so that the double single quote will be replaced as single quote?
Are you saying the datagrid is converting a single quote from the
database two 2 single quotes?
On 12 Apr 2007 12:59:49 -0700, Larry Bud wrote:
On Apr 12, 1:10 pm, "Eric Layman" <namyalcire[at no spam]gmail.com>
wrote:
>Hi,
I've saved data into the db by doing a replace() on single quote.
Right now on data display on a datagrid, it shows double single quote.
How do I make changes during run time of datagrid so that the double single quote will be replaced as single quote?
Are you saying the datagrid is converting a single quote from the
database two 2 single quotes?
If the database stored a double quote then your code to save is the
culprit. Are you by any chance using parameterize queries for the insert?
If you are then there is no need to do the replace as parameters are smart
enough to handle single quotes
--
Bits.Bytes http://bytes.thinkersroom.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Richardson |
last post by:
I've been bothered for some time about my DataGrid not populating my rows
very quickly. I have about 10K rows loading into the grid.
I create a datatable dt with 2 columns, an ID and a display. The ID is a
member of the keys array.
I then create a DataView dv over the table, and sort it by Display and ID
column (in case of duplicate Display).
I then set my DataGrid.DataSource = dv;
I then load the datatable with my rows, and this is...
|
by: Daniel Armstrong |
last post by:
Hello,
I have a usercontrol that I have built that has a single generic
datagrid. When setting up the inital properties I build the template
columns for the datagrid dynamically so it can display as readonly or
readwrite. The readwrite displays link buttons for edit, update,
cancel and delete buttons.
When I click on a edit link button the page using the usercontrol will
begin it's page load event and then the usercontrol page load...
|
by: optimizeit |
last post by:
What I am attempting to do is import an Excel Workbook and display the
worksheets in a datagrid dynamically.
I am very close to getting this to work. I have to this point
successfully imported a single worksheet into a dataset. I successfully
built a dynamic datagrid. And I did successfully bind it to the
dataset. Then I added the datagrid control to a PlaceHolder. The first
worksheet displays beautifully.
The next step is to allow...
|
by: Neo Geshel |
last post by:
Greetings
I am using VB in my ASP.NET project that uses an admin web site to
populate a database that provides content for a front end web site. I am
looking for a way to use replace() to replace multiple entries of an
object within a string. That is, if a user hit twice to create
one new line, but just once to create another, I want both types
( & twice
to create a new line (by creating a blank line between paragraphs). ...
|
by: Tim::.. |
last post by:
Hi
I'm trying to create a little application that shows an image of a user when
you mouseover there details in a datagrid. The datagrid is populated from an
Active Directory Database and I presume the best way to create the popup is
by using a layer with javascript hide and show...
I intend to use a database to store the pictures in and the use the users
full name to build a relationship between the database with the images and
the...
| |
by: Ron L |
last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying
to display in a datagrid. This datasource has 4 columns that I am
interested in here, a text column and 3 value columns corresponding to
permissions to certain data classes. I want to put the permission values in
combo boxes in the grid and instead of displaying the numeric values, have
the combo box display a string that corresponds to the numeric value (i.e.
No...
|
by: mark |
last post by:
I have a simple windows application that has a function to read a csv file
and enter the values into an array A as double(,). Also, an instance of form
2 (which has a DataGrid) is created and the values of A are used to populate
the grid via a DataView. The instance of form2 is called Matrix_A . The basic
layout is as follows:
#Region "Globals
Dim A As Double(,)
Dim Matrix_A As form2
#End Region
|
by: Brock |
last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The
reason for this is that I want the user to be able to change values
without updating the database, but still have their report reflect the
values they anticipate committing to see hypothetical totals of
columns from a set of records. These records are displaying properly
on my DataGrid but I'm not sure how to get Crystal Reports 10 to use
as its datasource the dataset...
|
by: =?Utf-8?B?SnVsaWEgQg==?= |
last post by:
Hi all
Got a weird problem with pagination on a datagrid in asp.net 1.1.
It's populated depending on user selected criteria (it either displays all
or 1 record). It works fine in the following circumstances:
Datagrid populated with 1 record then re-populated with all
Datagrid populated with 1 record then re-populated with another single record
Datagrid populated with multiple records and displaying page 1 then
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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...
| |