deployed app does not work like debug app

crij

New member
Joined
Nov 12, 2004
Messages
1
Programming Experience
Beginner
I have a windows app that works perfectly when i am running it in debug mode, but when i install it (on the same machine and on others). it seems to stop running code after a while. I have made sure that there is no difference between the code that i run in debug and the installation package (which i use .NET's wizard for). I have also put in msgbox's to be able to see where my code is executing.

HEre is some sample code:
'This first part has some message boxes that shows the value of my variables and everything checks out. Even the msgbox "(Run Instance") verifies that my reference to the class with the method i want to use is still in scope. The code seems to fail at the line "working = run.InsertData(......" the run variable is still in scope and it should call the method (which i also pasted). It does not even get to the method becuase i have a message box that runs the very first thing in that method.
If getXSDMap() <> "" Then

MsgBox("Trying to insert data using an xsd mapping")

MsgBox("xml file = " & xml_file)

MsgBox("xsd_mapping = " & getXSDMap())

MsgBox("datasource = " & getDatasource())

MsgBox("Database = " & getDatabase())

MsgBox("user = " & getUser())

MsgBox("password = " & getPW())

MsgBox("Run instance = " & run.ToString)

working = run.InsertData(xml_file, getXSDMap(), getDatasource(), getDatabase(), getUser(), getPW())

MsgBox("Working = " & working.ToString)

Else



PublicFunction InsertData(ByVal xml_file AsString, ByVal xsd_mapping AsString, ByVal datasource AsString, ByVal database AsString, ByVal uid AsString, ByVal pwd AsString)

MsgBox("IN RUNSERVICE.INSERTDATA with mapping")

Dim bulk AsNew SQLXMLBulkLoad

MsgBox("Created XMLBULKLOAD")

Try

'Inserts data into SQLServer using the specified mapping file

bulk.ConnectionString = "provider=SQLOLEDB; data source= " & datasource & "; database=" & database & "; uid=" & uid & "; pwd=" & pwd

bulk.Execute(xsd_mapping, xml_file)

MsgBox("INSERT DATA OK")

Catch ex As Exception

MsgBox("INSERT DATA ERROR")

ReturnFalse

ExitFunction

EndTry

ReturnTrue




I am so incredibly stuck!!!! PLEASE HELP!
 
Last edited:
Back
Top