Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 5th, 2004, 12:44 PM
RickPiller RickPiller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 5 RickPiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ADO STREAM problem

It seems that the method LoadFromFile works in Developer mode, but when I make an .exe I get "File Could Not Be opened." Anyone know what gives on this? Thanks.

Reply With Quote
  #2  
Old January 5th, 2004, 11:33 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Can u post a part of your code which have this wrong??

Reply With Quote
  #3  
Old January 6th, 2004, 07:01 AM
RickPiller RickPiller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 5 RickPiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Code:
Private Sub Form_Load()
    SendInfo
End Sub


Public Function SendInfo()
    If Command <> "" Then 'must have a command line argument
        ReadIPFile
        Socket.Close
        Socket.Connect strIP, 500 'sends us into Socket_Connect event
    Else
        MsgBox "USAGE: DROP ANY FILE ON ME."
    End If
End Function


Private Sub Socket_Connect()
    Dim adoStream As New ADODB.Stream
    Dim ifFile As FILE_INFO
    
    adoStream.Open
    adoStream.Type = adTypeBinary
    'open file and read it in
    'Open Command For Binary As #1
    'Get #1, , data
    adoStream.LoadFromFile Command '*************FAILS IN EXE***********
    'Close #1
    
    'set file info
    ifFile.size = adoStream.size
    ifFile.filepath = strPath & GetFileName(Command)
    
    'send file info first
    Socket.SendData ifFile.size & "-" & ifFile.filepath
    DoEvents 'flush the socket
    'now send the actual data
    Socket.SendData data
    'DoEvents 'flush the socket
    
    'clean up
    'Socket.Close
    'adoStream.Close
    'End
End Sub



here is the code. I mark where it fails when it's made an .exe

Reply With Quote
  #4  
Old January 6th, 2004, 07:44 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
I think it's right if the "command" path is right and can be accessed!..
Knowledge link:
http://msdn.microsoft.com/library/d...les_vb01_18.asp

Reply With Quote
  #5  
Old January 6th, 2004, 07:47 AM
RickPiller RickPiller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 5 RickPiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If it's able to be accessed in developer mode it should be able to be accessed in an executable right?

Reply With Quote
  #6  
Old January 6th, 2004, 07:06 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Yes,I'm sure..Your Sub "Socket_Connect" is right..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > ADO STREAM problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT