Viewing 15 posts - 46 through 60 (of 66 total)
Look into Data Transformation Services....you can write a DTS package that will import an excel file into a table. You can execute a package from VB.NET like:
Public Function
May 25, 2006 at 12:58 pm
Huh, you shouldn't have any trouble storing that in a SQL DataTime. Try appending 1/1/1900 to it before you convert it back to a Date and see what happens.
May 15, 2006 at 12:29 pm
When you look at:
dr.rec_checkin_time
What value is in there before the Insert? Put a break point and a watch on it after you set it.
May 15, 2006 at 6:58 am
I don't know what dr.rec_checkin_time is, but I would guess it is a datetime field of some sort?
Try:
dr.rec_checkin_time = CDate(Now().ToShortTimeString )
May 12, 2006 at 2:41 pm
You can get just the Time part of a DateTime with a ToLongTimeString or ToShortTimeString. e.g.:
Dim MyTime as DateTime
MyTime = MyDateTime.ToLongTimeString()
Then the SQL is easy...
"INSERT INTO MyTable...
May 12, 2006 at 12:08 pm
Prolly something like:
SELECT * FROM MyTable WHERE (MyDate > '2006/5/8' OR (MyDate = '2006/5/8' AND MyTime >= '09:00:00')) AND (MyDate < '2006/5/10' OR (MyDate = '2006/5/10' AND MyTime <= '21:30:00'))
I'm sure there is probably...
May 11, 2006 at 9:20 am
Huh, thanks, that's cool. How do I run that script so it updates the database I want? I notice it has:
N'[dbo].
Does that just mean use the currently opened DB?
May 10, 2006 at 1:00 pm
Would you post the source for the entire function or sub where you are getting the error so we can see exactly what you are doing with you SQL Command,...
May 10, 2006 at 12:06 pm
Hey thanks that was more in line with what I was looking for. I appreicate the help.
November 3, 2005 at 2:08 pm
Wow, that takes forever to complete....
November 3, 2005 at 1:59 pm
Nevermind....strangely enough if I look in the SQL Server books online there it is.....
November 3, 2005 at 11:41 am
Haha, right until I try to mash the above into that format....
Thanks for the help though guys, I appreciate it.
October 6, 2005 at 12:13 pm
Ok, talked it out with a co-worker and here is the approach I think I'm gonna go with...
select
t.a1 from thetable...
October 6, 2005 at 12:03 pm
Hmmm....that is kind of an issue....I am more looking for general cooncepts than specifics. I'm trying to convert somebody's old Access into SQL and the stuff is an utter mess....
October 6, 2005 at 10:03 am
Awesome, that works. Thanks alot, I really appreciate the help.
September 22, 2005 at 9:33 am
Viewing 15 posts - 46 through 60 (of 66 total)