|
-
Jul 2nd, 2012, 05:28 PM
#1
Thread Starter
Lively Member
problem with database
dear vbforum,
im writing this thread to ask about updating database automatically
i want the programme to do this:
go to guestinfo(database)> then go to guest id from this get the bigest number and add form this number one and placed it in the updating database
i want
if you want more infomration write it
yours,
paok
-
Jul 2nd, 2012, 10:08 PM
#2
Re: problem with database
if you want more infomration write it
yes need more info, any code u tried and what is the problem?
-
Jul 2nd, 2012, 11:06 PM
#3
Re: problem with database
Take a look at the MAX Function in SQL. eg
Code:
SELECT MAX(columnname) AS maxnumber FROM table
-
Jul 4th, 2012, 03:33 AM
#4
Thread Starter
Lively Member
Re: problem with database
Code:
Private Sub Command1_Click()
ConnectDB
rs.Open "guestinfo", db, 3, 3
rs.AddNew
rs(1) = txtFullName
rs(2) = txtAddres
rs(3) = txtPhoneNo
rs(4) = cboGender
rs(5) = txtAge
rs.Update
Set rs = Nothing
db.Close: Set db = Nothing
MsgBox "Successfully added new record!", vbInformation, "Save"
txtFullName = Empty
txtAddres = Empty
txtPhoneNo = Empty
cboGender = Empty
txtAge = Empty
LoadData 'to refresh records
End Sub
for this piece of code how and where i have to write it?
-
Jul 4th, 2012, 04:23 AM
#5
Re: problem with database
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|