Iron Speed Technical Forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
krishna

Registered:
Posts: 146
Reply with quote  #1 

Hi

Can any one please tell me what the heck is wrong with this code..
It simply refuses to work... frustrating...
The stored procedure extract the varbinary (jpg) files in the db and copies them to 
a local server directory.

If I execute the stored proc in sql server it works.

In my ISD app, the update panel smooth update is set to false.

Please help.


Public Overrides Sub Button1_Click(ByVal sender As Object, ByVal args As EventArgs)
Try
DbUtils.StartTransaction()
Dim firstParameter As BaseClasses.Data.StoredProcedureParameter = Nothing
firstParameter = New BaseClasses.Data.StoredProcedureParameter("@projectID", 2170, System.Data.SqlDbType.Int, System.Data.ParameterDirection.Input)
Dim parameterList(1) As BaseClasses.Data.StoredProcedureParameter
parameterList(0) = firstParameter

Dim myStoredProcedure As BaseClasses.Data.StoredProcedure = Nothing

'' If the stored procedure accepts parameters, use the following
myStoredProcedure = New BaseClasses.Data.StoredProcedure("Databaseedge7", "pExtractPhotos", parameterList)
If (myStoredProcedure.RunNonQuery()) Then
' nothin
Else
return nothing
End If
DbUtils.CommitTransaction()
Catch ex As Exception
'Report the error message to the end user
BaseClasses.Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", ex.Message)
DbUtils.RollBackTransaction()
Finally
DbUtils.EndTransaction()

End Try
End Sub

AllanB

Registered:
Posts: 216
Reply with quote  #2 
Is there a value for the error message property in your myStoredProcedure object?  myStoredProcedure.ErrorMessage
pinbot

Avatar / Picture

MVP Consultant
Registered:
Posts: 968
Reply with quote  #3 
So the SP is writing files?

My first guess would be a permissions problem.  If you are connecting in SSMS as "Windows Authentication" but to the database in Iron Speed as SQL Server Authentication (username/password) the queries may be running with different permissions.

My $.02 FWIW.





__________________
C. Bryan Patrick II
Iron Speed Designer MVP Consultant
Pseudo Consulting
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement