Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Apostrophe problem in datagridview

$
0
0

Hi,

I m using VS2005 and Sql server 2000

I have a problem with datagridview.

I m importing some data from excel sheet to datagridview and save it to sql server 2000 database using sql query.

Now if any cell has apostrophe( ' ) then it throw exceptions and not save the data

My question is , Is there any way that can use like find and replace method(i.e: find the aposhtrophe in datagridviewcells and replace nothing). I have used some looping but it works only when if there is nothing in cell expect apostrophe. But my apostrophes and in the middle of cell content (i.e: Master's of Ars, He is Hasan's Son etc.)

Please help me how can I eliminate all apostrophes wherever it is in datagridview.


Shakhawat


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>