Jump to content

saprouzy

Member
  • Posts

    46
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Lebanon

Everything posted by saprouzy

  1. man i hate those "which bla bla character are you" tests!! lol
  2. i made a module to create the dsn's but ur idea of dsnless connections is interesting i'll look into it, does it affect speed in any way? thanks
  3. the file that i want to check is not local, it's the remote file on the ftp that i want to check. i am getting the file not sending it i thougth about checking the size of the file 2 times in a row separated by 2-3 seconds, if the size is still the same then the file is still being written, and i try again after 5 minutes for example. but my managers didn't like the idea saying that i would cause alot of checking and alot of resources used on the server. (but i don't think so )
  4. thanks man i already found a dll, i was searching on google with no luck when i searched yahoo i got plenty of good results it's sad cause i loved google hehe thanks anyways
  5. hey there does anyone know of a dll or something that allows creation and manipulation of zip files from within vb? thanks
  6. suppose i have this: Set cnBIL = New ADODB.Connection With cnBIL .ConnectionTimeout = 500 .ConnectionString="uid=SQL_BLA;pwd=SQL_BLO;server=SQLserv;driver={SQL Server};database=TEST;dsn='SQL_TEST';" .CursorLocation = adUseClient .Open End With the program would crash if the dsn SQL_TEST isn't set in the user or system datasources list (working under wnidows 2000 it can be found under Administrative tools". so what i want is a way to create the dsn from vb, so that i don't have to set it for each person who's gonna use the application. i hope i made the problem clear. thanks for the help
  7. Hey there i have an applciation that gets files from an ftp server on a timer basis but sometimes it imports the file while it's beeing written. which causes problems, so i want to know if there's a way to know if the file is open for writing or not at the time when i want to get it. thanks
  8. saprouzy

    Jello

    once a guy went to the refrigerator and opened the door, he noticed the Jello shaking, he told him... "relaxe dude i just want to drink some water" lol silly but when i first heard it i couldn't stop laughing
  9. am using this, i think it will be enough for what i want to do, but i don't mind seeing more examples and/or different ways Private Sub Command1_Click() 'On Error GoTo err Dim objExcel Dim objWorkBook Set objExcel = CreateObject("EXCEL.APPLICATION") Set objWorkBook = objExcel.Workbooks.Open("C:\test.xls") For i = 1 To 20 For j = 1 To 20 objExcel.cells(i, j).Formula = i & ":" & j Me.Caption = "Testing vb-excel - " & i & ":" & j Next Next objWorkBook.SaveAs ("C:\test2.xls") objWorkBook.Close True Set objWorkBook = Nothing Set objExcel = Nothing ' objExcel.quit Exit Sub err: MsgBox "ohh nooo! :( look what happened : " & Error End Sub actually my purpose is to avoid designing a Crystal report, similar to excel files that are already done, so i thought about changing the excels directly
  10. Hey there, does anyone have a tutorial or something about working with excel through vb? i've found small examples, but i need a more informative document thanks.
  11. by more details i meant details about what is the program suppsoed to do, i did some java programming for phones. if it's not a very complicated thing i can try helping you.
  12. just a wild guess, but i think if you post more details you'll probably get more responses
  13. What would this do?!? MsgBox "Happy Birthday Indigo2005" hehe i accidently saw Indigo's name on "today's bday list" (i know he checks this forum since he was the first to try helping me on my first post )
  14. i replaced it with conn.Execute conn.URL, "CD " & ftp_src_dir While conn.StillExecuting: DoEvents: Wend conn.Execute conn.URL, "DIR " While conn.StillExecuting: DoEvents: Wend zFileList = conn.GetChunk(4096, 0) zFiles = Split(zFileList, vbCrLf) i = 0 While (i < UBound(zFiles) - 1) conn.Execute conn.URL, "GET " & zFiles(i) & " " & ftp_dest_dir & "\"& zFiles(i) wend it actually suits me better for my prog, but still it would be insteresting to know how to MGET the files
  15. hello there, am trying to import some files to a local direcotry from an ftp server am using the following code conn is an INet control i added the lcd command because i noticed that on ftp (run from command prompt) the mget puts the files in the directory where ftp was run from, so when i change the local current directory it will put them there. but my code isn't working. if anyone can test it and try to figure out what's wrong with it. thanks ps: i know there are api functions for ftp commands, but i prefer using Inet. Private Sub cmd_ImportFiles_Click() conn.URL = "ftp://user:password@192.168.0.1" Me.StatusBar.SimpleText = "Connected to Ftp." ftp_src_dir = "Alfa/Beta/" ftp_dest_dir = App.Path conn.Execute conn.URL, "lcd " & ftp_dest_dir While conn.StillExecuting: DoEvents: Wend conn.Execute conn.URL, "MGET " & ftp_src_dir & "*" While conn.StillExecuting: DoEvents: Wend MsgBox "end" End Sub
  16. i don't think Martin meant store as in selling/buying... or did he?
  17. haha that was my purpose, to see if anyone will vote YES!
  18. almost all the freakin time i work 10 hours / day in IT so am on the pc during all that time and when i go home, i am on the pc too, chatting or stuff or whatever so basically if i don't go out it's like 18 hours ... **** that's too much!
  19. no
  20. cool... but as i read about it, it seems it doesn't work with Windows 98
  21. Declare Function GetComputerNameA Lib "kernel32" (ByVal lpBuffer As String, nSize As Long) As Long Public Function GetComputerName() As String Dim sResult As String * 255 GetComputerNameA sResult, 255 GetComputerName = Left$(sResult, InStr(sResult, Chr$(0)) - 1) End Function this code will give u the computer name try reading the file into some buffer or something and search for the machine name in it, and then get the string that follows
  22. by kcxpress from another post, just in case you didn't see that one...
  23. try this, hope it helps.. http://www.logix4u.net/dll_tutorial1.htm
×
×
  • Create New...