473,395 Members | 1,456 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,395 software developers and data experts.

error during reading the names

198 100+
Hi!
i made a programe in which i want to print the names but
when the names like " Women's " which contain this " ' " sign it produces the syntax error
how can remove this error because i have to print this name in the same way
Feb 16 '08 #1
11 1137
QVeen72
1,445 Expert 1GB
Hi,

Do Input Validation for the TextBox.. Dont Allow User to Enter '
Write This Code in KeyPress Event of the TextBox:

Expand|Select|Wrap|Line Numbers
  1. If Chr(KeyAscii) = "'" Then KeyAscii = 0 
  2.  
REgards
Veena
Feb 16 '08 #2
veer
198 100+
Hi!
Actually i am accessing a file which already have these name
and through my programe i did some changing and then print all these names
thanks


Hi,

Do Input Validation for the TextBox.. Dont Allow User to Enter '
Write This Code in KeyPress Event of the TextBox:

Expand|Select|Wrap|Line Numbers
  1. If Chr(KeyAscii) = "'" Then KeyAscii = 0 
  2.  
REgards
Veena
Feb 16 '08 #3
QVeen72
1,445 Expert 1GB
Hi,

So you are getting error in SQL Select Statement..?
Print the Select statement here..

REgards
Veena
Feb 16 '08 #4
veer
198 100+
this is my select statement
Select * From " & dbfname & " Where CMPNYNM='" & rsMn(0) & "'"

THANKS
Hi,

So you are getting error in SQL Select Statement..?
Print the Select statement here..

REgards
Veena
Feb 16 '08 #5
QVeen72
1,445 Expert 1GB
Hi,

Try this :

Expand|Select|Wrap|Line Numbers
  1. sSQL = " Select * From " & dbfname & " Where CMPNYNM='"  _
  2.     & Replace(rsMn(0),"'","''")  & "'"
  3.  
Regards
Veena
Feb 16 '08 #6
veer
198 100+
Thanks it's working
Yesterday i asked a question to you about comparision of two columns
actually i want a order of data like
company name ---------indent
Hadley Dodd ---------- 0
Hadley Dodd --------- D

above example means
i have a column contains some company names and other has some indents like 0,D,1 . Firstly the name " Hadley Dodd" with indent "0" comes and print and then if same name comes but indent should be "D" or "1" etc print and then go to next record and if the same name does't come then move to next record

if you understand the programe then please give me some tips how i can search the columns
thanks
Hi,

Try this :

Expand|Select|Wrap|Line Numbers
  1. sSQL = " Select * From " & dbfname & " Where CMPNYNM='"  _
  2.     & Replace(rsMn(0),"'","''")  & "'"
  3.  
Regards
Veena
Feb 16 '08 #7
QVeen72
1,445 Expert 1GB
Hi,

I didnt understand your Problem..
But is it that you are Looking for "Order By"..?:

Try This :

Select * From MyTable Order By CompName, Indent

REgards
Veena
Feb 16 '08 #8
veer
198 100+
Hi!
actually i have a file in which data is randomly inserted
and i am accessing that file which have two columns i,e Company_Name , Indent. In company_name column one name may be repeated saveral times but with different indents like "0","D","1", "M" etc and i want the order like i have mentioned you in previous post

Hi,

I didnt understand your Problem..
But is it that you are Looking for "Order By"..?:

Try This :

Select * From MyTable Order By CompName, Indent

REgards
Veena
Feb 16 '08 #9
QVeen72
1,445 Expert 1GB
Hi,

So, is it a Text File..?
Means, You want To Parse a Text File..? How are the 2 Columns Seperated in the Text File ? (Any Special Characters To identify Column..?)

If not text file, and if it is Table, then use Select Statement (prev Post)

Regards
Veena
Feb 16 '08 #10
veer
198 100+
No its a .dbf file
i think you are not understanding my programe i attach a sample of file in doc format in which two tables are made the table contained random data
and the second contain a order wise data


please check and give some idea




Hi,

So, is it a Text File..?
Means, You want To Parse a Text File..? How are the 2 Columns Seperated in the Text File ? (Any Special Characters To identify Column..?)

If not text file, and if it is Table, then use Select Statement (prev Post)

Regards
Veena
Feb 16 '08 #11
QVeen72
1,445 Expert 1GB
HI,

If it is a dbf File, Create a Connection to DBF and Open a Recordset for the selected file...

or else
Post the code here..

REgards
Veena
Feb 16 '08 #12

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

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
5
by: K. Shier | last post by:
when attempting to edit code in a class file, i see the bug "Visual Basic ..NET compiler is unable to recover from the following error: System Error &Hc0000005&(Visual Basic internal compiler...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
3
by: yma | last post by:
Hi, I put a .aspx page inside Server.Transfer() within a button. The page was created for testing so it only has button and I did not add code. When I click the button, it gave me an error...
6
by: Michael | last post by:
Program builds solution and setup projects with no reported errors. Building and deploying as loose uncompressed files works just fine. Debug Building and deploying as a setup file results in...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
7
by: Tony Tone | last post by:
I am having trouble resolving this issue: Server Error in '/test' Application. -------------------------------------------------------------------------------- Compilation Error Description:...
4
by: =?Utf-8?B?QWxm?= | last post by:
Hello all, I am having trouble dealing with ~(tilde) in my .Net 1.1 web application, specially when it comes through the URL. For example, when someone requests the following URL:...
2
by: sagarbakliwal | last post by:
hi, I am new to this forum but i have received a lot of help reading through this forum. I am creating a VB.NET application for Patient Record Management. In this there are various combo boxes and...
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: 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?
0
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...
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...
0
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...
0
tracyyun
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...

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.