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

Saving Data in Second time Entry

iam saving the data into Ms-Access database using Vb.net Application
In that application iam using Data grid view to save the data into the database
Here in the below code iam saving the name of stalls into the database
i have to save according to number given in the textbox .but first i saved only two stallnames and next time i want to save the remaining stall names then it is not possible it checks the starting two stallnames and showing the message box "Stallname already saved" .but iam appending the data here
how could i im sending code please check it once any one reply me

While k < grvStalls.Rows.Count - 1
For k = 0 To grvStalls.Rows.Count - 1 Step 1
For p = 0 To 3 Step 1
str1 = "select Stallname from StallName where Stallname= '" & grvStalls.Rows(k).Cells(p).Value & "' and Eventid=" & cmbEvent.SelectedItem.datavalue & " "
emsg = ""
emsg = dbcon.GetCheckFlag(str1, flag1)
If emsg = "" Then
If flag1 = 0 Then
If grvStalls.Rows(k).Cells(p).Value <> "" Then
grvStalls.Rows(k).Cells(p).Value = Replace(Trim(grvStalls.Rows(k).Cells(p).Value), "'", "''")
str = "" & cmbEvent.SelectedItem.datavalue & ", " & _
"'" & grvStalls.Rows(k).Cells(p).Value & "'"
emsg = ""
dbcon.savestallname(str, emsg, stid)
End If
Else
MessageBox.Show("Stallname Already Saved")
Exit Sub
End If
End If
Next
Next
End While
If emsg = "" Then
MessageBox.Show("record saved")
'Exit Sub
Else
MessageBox.Show(emsg)
End If
Mar 20 '08 #1
0 915

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

Similar topics

3
by: | last post by:
Hi, I am an intermediate computer science student and I am in need of a "macro type" tool/language that will let me automate a data entry process. The data entry is rather simple but requires...
138
by: theodp | last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml Microsoft Patents Saving The Name Of A Game Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM from the...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
0
by: tamilan71 | last post by:
Can anyone tell me a simple method of creating an application in Access 2003 that uses "Double data entry"? For me double data entry is defined as the ability to have data entered twice. The first...
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
1
by: maiami2 | last post by:
Hi Guys, I'm very new to access and I've been trying to get the hang of it over the last few days, but I've become very confused with various aspects of how to code it. Introduction: I am...
1
by: natwong | last post by:
Hi All, I'm hoping that someone could help me out since I'm new with Access. Background: Database was set up as a simple data entry and reporting tool for Program Initiatives. The data...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.