 |
| 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
|
|
|
|

February 14th, 2007, 01:24 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 14th, 2007, 02:16 AM
|
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
|

February 14th, 2007, 05:05 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 14th, 2007, 10:37 AM
|
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
|

February 14th, 2007, 10:52 AM
|
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?!
|
|
|
 |