Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2007, 01:24 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For getting the data from DB, there are some ways, but approach is one. After executing the Recordset with SELECT statement, use rst!<field name> or rst.fields(index) and store the data in the variable and initialize that variable to particular control box

E.g:-
getting email id
dim s as string
s = rst!emailid
text1.text = s

This normal process. But Sometimes it causes a error if you have NULL value in emailid field in the DB. So before setting it to the control check for IsNull, if false then proceed. So RTE is not shown and data is seen.

And for the Popup Calendar,
1) Do you mean creating a control like Calender?
OR
2) Just want to show the Calender control in the separate form and call it when a click of button and get the date from the calender and put into the text box or label

IF #1, don't think about it, Its easy yet so complex, but not now. IF #2 then I don't see any difficulties.

a) draw a calender in the form (set the color and look and size as needed)
b) in the button_click of the button load the form
c) when click of the calender, put the date selected in to the text box (or any)
d) close the calender window.

IF NOT #2, then explain whats your need properly, will look it out.

Hope this helps.

With Regards,
Raghavendra Mudugal
 
Old February 14th, 2007, 02:16 AM
Authorized User
 
Join Date: Jan 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to cnkumar74 Send a message via Yahoo to cnkumar74
Default


Dear Member,

     What I wanted is #2. Can u help me.....?



    cnkumar74




Quote:
quote:Originally posted by Raghavendra_Mudugal
 For getting the data from DB, there are some ways, but approach is one. After executing the Recordset with SELECT statement, use rst!<field name> or rst.fields(index) and store the data in the variable and initialize that variable to particular control box

E.g:-
getting email id
dim s as string
s = rst!emailid
text1.text = s

This normal process. But Sometimes it causes a error if you have NULL value in emailid field in the DB. So before setting it to the control check for IsNull, if false then proceed. So RTE is not shown and data is seen.

And for the Popup Calendar,
1) Do you mean creating a control like Calender?
OR
2) Just want to show the Calender control in the separate form and call it when a click of button and get the date from the calender and put into the text box or label

IF #1, don't think about it, Its easy yet so complex, but not now. IF #2 then I don't see any difficulties.

a) draw a calender in the form (set the color and look and size as needed)
b) in the button_click of the button load the form
c) when click of the calender, put the date selected in to the text box (or any)
d) close the calender window.

IF NOT #2, then explain whats your need properly, will look it out.

Hope this helps.

With Regards,
Raghavendra Mudugal
 
Old February 14th, 2007, 05:05 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have already mentioned you those four steps from a to d for #2, read it again. And tell me what you don't understand.

With Regards,
Raghavendra Mudugal
 
Old February 14th, 2007, 10:37 AM
Authorized User
 
Join Date: Jan 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to cnkumar74 Send a message via Yahoo to cnkumar74
Default


Code:
 Thanks a lot. I will try.
 cnkumar74

Quote:
quote:Originally posted by Raghavendra_Mudugal
 I have already mentioned you those four steps from a to d for #2, read it again. And tell me what you don't understand.

With Regards,
Raghavendra Mudugal
 
Old February 14th, 2007, 10:52 AM
Authorized User
 
Join Date: Jan 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to cnkumar74 Send a message via Yahoo to cnkumar74
Default


How can we get the datas back from the DB? Please give me the code...As I am a beginner in VB.



cnkumar74





Quote:
quote:Originally posted by HaveHave2222
 Which version of Visual Basic do you use?

Tested with version 2005.net, works fine?!






Similar Threads
Thread Thread Starter Forum Replies Last Post
setting system time angelboy C# 2005 1 May 4th, 2007 08:05 PM
How can I set system time & date in VB.net ? mike123abc Pro VB.NET 2002/2003 1 April 27th, 2007 10:00 AM
HOW CAN SYSTEM DATE N TIME BE CAPTURED IN A TXTBOX cnkumar74 VB Databases Basics 6 February 14th, 2007 02:09 AM
System Lockup time vincent737 C# 0 July 21st, 2005 05:58 AM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.