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

Help to store in Ms Access

hi All

Q1.
i want to store string like

" vinay's home " in access database using vb.net

but my query get dropped because of " ' " in string input

and it become

Qry="Insert into info values('vinay's home')

i got error in this case so any one knows

how can i resolve it ??
Q2
is there any way to create store procedure for Access database if yes
than how ?
Waiting for Reply

Thanks in advance

With Regards

Vinay Patel

Apr 14 '07 #1
3 1104
On 13 Apr 2007 22:39:39 -0700, Vinay Patel wrote:
hi All

Q1.
i want to store string like

" vinay's home " in access database using vb.net

but my query get dropped because of " ' " in string input

and it become

Qry="Insert into info values('vinay's home')

i got error in this case so any one knows

how can i resolve it ??

Q2
is there any way to create store procedure for Access database if yes
than how ?

Waiting for Reply

Thanks in advance

With Regards

Vinay Patel
Two options
1) Use parameterized queries (OleDB commands using OleDbParameters)
2) Replace all ' with '' using the String.Replace method
--
Bits.Bytes
http://bytes.thinkersroom.com
Apr 14 '07 #2
Hi Vinay

http://msdn.microsoft.com/library/de.../acfundsql.asp

http://msdn.microsoft.com/library/de...l/acintsql.asp

http://msdn.microsoft.com/library/de...l/acadvsql.asp

I hope this helps a little bit?

Cor
"Vinay Patel" <pa*****************@gmail.comschreef in bericht
news:11**********************@w1g2000hsg.googlegro ups.com...
hi All

Q1.
i want to store string like

" vinay's home " in access database using vb.net

but my query get dropped because of " ' " in string input

and it become

Qry="Insert into info values('vinay's home')

i got error in this case so any one knows

how can i resolve it ??
Q2
is there any way to create store procedure for Access database if yes
than how ?
Waiting for Reply

Thanks in advance

With Regards

Vinay Patel

Apr 14 '07 #3

Open up the database.

Add a new Query. Change the type to "Updateable" I think it is.

Start out with something simple like

qryCustomerUpdate

Maybe supply 2 parameters

pCustomerID , pLastName

and the query is

Update Customer Set LastName = pLastName where CustomerID = pCustomerID

the last time i did this (circa 2001 I think) i used to put 'p' s in for
parameters, to increase readability, since there is no @variableName like in
sql server.

It's something along those lines.

"Vinay Patel" <pa*****************@gmail.comwrote in message
news:11**********************@w1g2000hsg.googlegro ups.com...
hi All

Q1.
i want to store string like

" vinay's home " in access database using vb.net

but my query get dropped because of " ' " in string input

and it become

Qry="Insert into info values('vinay's home')

i got error in this case so any one knows

how can i resolve it ??
Q2
is there any way to create store procedure for Access database if yes
than how ?
Waiting for Reply

Thanks in advance

With Regards

Vinay Patel

Apr 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jay | last post by:
I previously posted this question under Visual Basic newsgroup, but was advised to re-post here. I'm hoping someone can help me solve an issue I'm having with VB.Net and Access 2000. Here's...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: Lyn | last post by:
Hi, I am struggling to display photographs in a list format. Any help will be greatly appreciated. Originally I had attempted to store photographs as embedded OLE Objects, but had lots of...
6
by: \jason via DotNetMonster.com\ | last post by:
currently i am doing a personal website and keep on changing the aspect... finally the finall decision is to have a login page (requirement in asp.net, vb.net) and the login with security part of...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
3
by: Wired Hosting News | last post by:
Lets say I have 10 products in 10 different stores and every week I get a report from each store telling me how many items they have left for each of the 10 products. So each week I enter in 100...
8
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
1
by: Webstorm | last post by:
Hi, I hope someone can help me sort this out a bit, Im completely lost. Here is the page I am working on: http://www.knzbusinessbrokers.com/default.asp I have 3 search critera that I need to...
1
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4...
2
by: hcaptech | last post by:
This is my Test.can you help me ? 1.Which of the following statement about C# varialble is incorrect ? A.A variable is a computer memory location identified by a unique name B.A variable's name...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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...
0
agi2029
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,...

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.