Hello,
What I'm trying to do seems so simple. But for the life of me I've not been able to figure it out on my own using the wealth of support out there.
My Objective:
I simply want to pull two rows from a SQL 2005 table, change one of them, and save it back to the database.
My Challenge:
One of the rows is stored in hours. I would like it to display in days on my form but save to the table in minutes.
My Problem:
I don't know how to code I'm just trying to put together a little utility to save us some time.
History:
I have a medical records application that charts patients encounters. These encounters need to be set to automatically lock after a given number of days. For some reason the vendor did not include this functionality in the GUI or admin consol; it must be set with an update statement. So I want to make a little utility that displays the name of the practice in a ComboBox and the corresponding lock interval in a TextBox.
This part was easy. What I can't for the life of me figure out is how to make the text box display in days instead of hours; I mean it's a simple x /24 for crying out loud!
I am able to accomplish this in SQL by creating a stored procedure or a view on the source database. But that’s not how I want to go about this. There has to be a way (probably several) to get this done in VB.
So I think I'm looking for one of three things but who knows, maybe I dont know enough to know what I' looking for:
Would it help for me to paste the code I'm working with? Good God how do you people put up with us novices? Thx in advance for any help you can offer.
dave
What I'm trying to do seems so simple. But for the life of me I've not been able to figure it out on my own using the wealth of support out there.
My Objective:
I simply want to pull two rows from a SQL 2005 table, change one of them, and save it back to the database.
My Challenge:
One of the rows is stored in hours. I would like it to display in days on my form but save to the table in minutes.
My Problem:
I don't know how to code I'm just trying to put together a little utility to save us some time.
History:
I have a medical records application that charts patients encounters. These encounters need to be set to automatically lock after a given number of days. For some reason the vendor did not include this functionality in the GUI or admin consol; it must be set with an update statement. So I want to make a little utility that displays the name of the practice in a ComboBox and the corresponding lock interval in a TextBox.
This part was easy. What I can't for the life of me figure out is how to make the text box display in days instead of hours; I mean it's a simple x /24 for crying out loud!
I am able to accomplish this in SQL by creating a stored procedure or a view on the source database. But that’s not how I want to go about this. There has to be a way (probably several) to get this done in VB.
So I think I'm looking for one of three things but who knows, maybe I dont know enough to know what I' looking for:
- To know how to do calculations on a TextBox populated with data from a DataSource.
- To know how grab data from a DataSource and assign it to a variable so I can work with it and then put the results in a text box that is still connected to the original DataSource. I'm not sure if I explained this one right. What I need is for the lock encounter TextBox to still synch up with the lock Practice ComboBox.
- To know how to incorporate SQL queries into VB code.
Would it help for me to paste the code I'm working with? Good God how do you people put up with us novices? Thx in advance for any help you can offer.
dave