Connecting Tech Pros Worldwide Forums | Help | Site Map

I have a script that works in WinXP SP2 but not in WinXP SP1

Newbie
 
Join Date: Mar 2007
Posts: 2
#1: Mar 24 '07
I have a scrip that works in XP SP2 but not in XP SP1
--------------------------------------------------------------------------------

I have the following scrip that works in XP SP2 but not in XP SP1

// Script
sub UpLoad (UploadFileName)
dim b1
b1=&H4000000 ' is required
set objStream =CreateObject("ADODB.Stream")
set objRecord =CreateObject("ADODB.Record")
set cnn =CreateObject("ADODB.Connection")
cnn.Open "provider=MSDAIPP.DSO;data
source="&document.all.NameMachine.value
objRecord.Open UploadFileName,cnn, 3,b1
objStream.Type = 1 'adTypeBinary
objStream.Open objRecord,3,4 ///// error line /////
objStream.LoadFromFile "c:\"+UploadFileName

objStream.Flush
objStream.Close
objRecord.Close

Set objStream = Nothing
Set objRecord = Nothing
cnn.close
set cnn = nothing
end sub

Error description : No such interface is supported

Any idea will be appreciated highly

--------------------------------------------------------------------------------

yoda's Avatar
Needs Regular Fix
 
Join Date: Dec 2006
Location: canada
Posts: 273
#2: Mar 24 '07

re: I have a script that works in WinXP SP2 but not in WinXP SP1


Quote:

Originally Posted by mahsina

I have a scrip that works in XP SP2 but not in XP SP1
--------------------------------------------------------------------------------

I have the following scrip that works in XP SP2 but not in XP SP1

// Script
sub UpLoad (UploadFileName)
dim b1
b1=&H4000000 ' is required
set objStream =CreateObject("ADODB.Stream")
set objRecord =CreateObject("ADODB.Record")
set cnn =CreateObject("ADODB.Connection")
cnn.Open "provider=MSDAIPP.DSO;data
source="&document.all.NameMachine.value
objRecord.Open UploadFileName,cnn, 3,b1
objStream.Type = 1 'adTypeBinary
objStream.Open objRecord,3,4 ///// error line /////
objStream.LoadFromFile "c:\"+UploadFileName

objStream.Flush
objStream.Close
objRecord.Close

Set objStream = Nothing
Set objRecord = Nothing
cnn.close
set cnn = nothing
end sub

Error description : No such interface is supported

Any idea will be appreciated highly

--------------------------------------------------------------------------------

maybe in it only works in sp2 because there are some added files in system32 that you need to the run the app.
Reply


Similar Visual Basic 4 / 5 / 6 bytes