@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4



Comments:

<0> x= cdate(" 9/18/2006") - cdate("9/12/2006")
<1> TB: i need to create import from excel, should i put it first to grid before exporting to sql? or better to do it directly?
<2> <0> x= cdate(" 9/18/2006") - cdate("9/12/2006")<-------- what does cdate for?
<1> also i need to create the progress bar
<3> if it's in xls format, i'd just read it in with adodb
<1> can you help me?
<2> progress bar?
<1> ok
<2> use timer then...?
<3> slicers: with literals, just use ##
<1> but i want to let the users see the progress or percentage of the import
<2> so...
<3> msgbox ( #9/18/2006# - #9/12/2006# )
<2> i have tried b4 but i failed....:s
<3> cigish: how big of an import is it?
<2> i dunno how to show progress bar percentage



<1> 300,000 records
<1> at 2mbps vpn
<2> <3> msgbox ( #9/18/2006# - #9/12/2006# ) <---- so it shall show the result as 6?
<3> well i suppose it's concievable that you could get a record count before starting the move
<1> davn7 in what interval do u need? dyas, months, quater or years?
<1> ok
<2> days
<1> then i will create a loop?
<3> davn7: vb stores dates internally as double values with units of days since the epoch. as such, using them arithmatically like so would indeed give you a numerical result. and since they're units of days, straight subtraction would certainly give you the number of days difference
<3> but unlike datediff, if there's a timepart, the TOTAL difference between the days is accounted for in the decimal portion of the result
<1> davn7: x=datediff("d",@date2,@date1)
<2> <1> davn7: x=datediff("d",@date2,@date1) <--- so it results will be in day?
<3> interestingly enough, you can iterate over days using For i = date1 to date2
<1> @date1 or @date2 could be cdate(text1.text)
<2> <1> @date1 or @date2 could be cdate(text1.text)<-------- but you haven't tell me what does cdate for?
<1> TB: do i need to do a lopp for the insert then calculate a percentage w/ the total numbers of records?
<1> convert to date
<3> converts the value to type datetime
<3> cigish: uhh, yes. it would be an iterative process
<1> wow tnx man
<2> wow thnx man
<3> given the total, you could then in your loop calculate the progress (increment a counter for example)
<1> oic
<3> i would hold off on updating the progress bar control until such intervals that would actually cause it to update
<3> particularly if it's 300,000 records
<1> im just thinking if an error occur? how can i drop the import?
<1> i mean i just want it all or nothing
<3> drop the import? as in rollback a transaction?
<1> yes
<3> is it going into ms sql?
<1> yes
<3> well it's called t-sql for a reason. look into using transactions with ms sql
<1> but since it would be a loop
<3> in the end, if it's successful, you'll just commit the updates/inserts or rollback to cancel it all
<1> the first loop could be successfull
<3> should only be one loop
<3> not that it matters
<1> really?
<3> sure, why not?
<3> it's one import, no?
<1> can i insert in bulk?
<3> one xls file?
<1> yes
<1> 1 import
<3> you could import in bulk and it really wouldn't matter still. your code will begin the transaction and send any amount of sql statements at the db as your little heart desires. but they dont stick until you commit them, ending the transaction. anytime before that you can cancel and rollback the changes thus far
<1> how could i know that it's done w/ the import?
<1> should i p*** the total number of records?
<1> as parameter then if the loop is equal to the total records then in i will commit?
<3> if it's already known, sure. otherwise as i said, you probably already have an odbc driver for reading xls files with adodb. so you could get a count from each xls file from that
<1> oic
<1> tnx so much :-)
<3> and if that's the route you go, you'll likely end up doing a full on select * from foo.xls and using a while loop on that. just do a while not rs.eof and not failed
<3> failed initializes to false before loop
<3> set failed to true in loop if there's a problem
<3> after loop, if failed then ' crap
<3> else ' commit
<3> end if
<3> yadda yadda
<3> sisk boom bah
<1> wow
<3> and stuff



<1> yeah yeah that's nice
<2> oh guys...
<2> x = datediff("d",date1,date2")
<2> what if the date1 = 0?
<2> error?
<1> if date1 ="" then date1 =Null
<1> ur using sql?
<2> me?
<1> yes
<2> nope vb07
<2> nope vb06
<1> ok no database involved?
<1> 0?
<1> wahy 0?
<2> nope
<2> database involved
<1> do some error trapping
<1> what database? access?
<2> yeah
<1> oic
<2> i just wanna count when is the person last login
<1> just use date1 ="#" & date1 & "#"
<1> and date2 ="#" & date2 & "#"
<1> before u do the datedif
<2> shall i declare the date1 ? or shall i make a variable?
<1> datediff
<2> ok ok
<1> dim date1,date2
<1> variant is fine
<2> hm...
<2> thnk cigish
<1> np
<2> you informations r so valueable for me....
<1> im like u, we're novice
<1> ehehe
<2> yeah...
<2> but u know a lots than me...
<2> sincerly, thnks
<1> those w/ @ at the beginning of their nick .. they're the knowledgable
<1> np
<2> all the op are prof?
<1> also those w/ + i guess
<1> like BW
<1> ehehe
<1> Blackwand the sewer God
<1> ehehe
<2> hehe
<2> where r u now?
<1> phil
<2> so far
<1> yes
<2> got missiles fly over your head?
<2> :)
<1> not yet
<1> ehehe
<2> hehe
<2> wish there are no missiles would fly over there
<4> gay brothel kickstand?
<2> heh?
<1> ehe
<1> broke back mountain
<5> lol
<5> how goes it?
<2> lol
<1> nice color
<4> sup brutha from a different mutha otha than the mutha of mine?
<2> ...
<1> ehehe
<5> thinking about heading towards bed
<2> so you r in the nite there?
<4> wink wink


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #vb
or
Go to some related logs:

world's thorniest rose
#allnitecafe
Jenat Jackson
#linux
#chat-world
hot aisian
#chat-world
#india
#india
navisha



Home  |  disclaimer  |  contact  |  submit quotes