944,091 Members | Top Members by Rank

Ad:
Dec 22nd, 2006
0

Help on making and using Database in VB

Expand Post »
Hi
I am developing an automation system using PC. I have built quite a big hardware but when it comes to Visual Basic, I am a novice. I have done a lot but need help in using database. I know how to link it in VB, i.e by using datacontrols(i prefer it over adocontrols) and linking them with labels etc BUT I dont know how to create a database and how to extract and use its data.
The database i need would contain date,time, id and operations field. Can any one tell me how can i create such a db in VB using visdata or in MS-access.... which ever is easiest

And how do I extract the date/time and compare it with current PC time.. then if found matched read other field values else progress forward.
Can anyone help me around on these "simple" issues. Codes or links to tutorials will do great!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fskhan is offline Offline
3 posts
since Dec 2006
Dec 22nd, 2006
0

Re: Help on making and using Database in VB

make the database in MS access thats the easiest
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,534 posts
since Apr 2005
Dec 25th, 2006
0

Re: Help on making and using Database in VB

Hi,

Use MS-Access,
Go to MS-Access, Select NewDatabase Option,
Enter Path and Name , Say Create.
Click On New-->>Design View-->> OK
Enter Field Name, Type : Date/Time (Stores Both).

In VB, to get System Date :
Format(Date,"dd-mm-yyyy")
System Time :
Format(Now,"hh:mm:ss")

Compare Dates :
If Format(CDate(Text1.Text),"dd-mm-yyyy") =
Format(Date,"dd-mm-yyyy") Then
' Write ur coding Here
End If

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Dec 25th, 2006
0

Re: Help on making and using Database in VB

Click to Expand / Collapse  Quote originally posted by QVeen72 ...
Hi,

Use MS-Access,
Go to MS-Access, Select NewDatabase Option,
Enter Path and Name , Say Create.
Click On New-->>Design View-->> OK
Enter Field Name, Type : Date/Time (Stores Both).

In VB, to get System Date :
Format(Date,"dd-mm-yyyy")
System Time :
Format(Now,"hh:mm:ss")

Compare Dates :
If Format(CDate(Text1.Text),"dd-mm-yyyy") =
Format(Date,"dd-mm-yyyy") Then
' Write ur coding Here
End If

Regards
Veena
Thanks... that was great help. It was the same kind of code that I needed. But all to thanks Allah i had already accomplished the task. Got a hand on a very good tutroial on VB, perfect for novice and enough to build real applications. Incase anyone ever need help, i am listing the web address of that tutorial.

www.vbtutor.net

I'll include a bit of my intro as well as i am a newbie on this website. I am a student of Electronics Engg. and am building an automation system using Powerline Communications based on Personal Computer and Embedded Systems. Needed help for the same... and incase anyone ever find any problems in area listed above.. plz donot hesitate to ask..(send a private msg)

tc thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fskhan is offline Offline
3 posts
since Dec 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB6 Building Access from code
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: vb 5.0 to excel





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC