Author |
Topic |
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 13:48:10
|
Here is the error message. Do you get anything from this?
Server Error in '/bio/enbiolog' Application. --------------------------------------------------------------------------------
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1002: ; expected
|
Edited by - Torborg on 16 August 2007 13:54:01 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 14:01:24
|
I tried that too. But.. OK I'll try again :-) |
|
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 14:03:38
|
Server Error in '/bio/enbiolog' Application. --------------------------------------------------------------------------------
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Source Error:
Line 39: if (PhotoUpload.PostedFile.FileName != "") Line 40: Response.Write (FilePath + UploadedFileName); Line 41: Response.End; Line 42: PhotoUpload.PostedFile.SaveAs(FilePath + UploadedFileName); Line 43: {
Source File: f:\ekanal\www1\bio\enbiolog\testforum\pop_upload.aspx Line: 41
|
Edited by - Torborg on 16 August 2007 14:04:29 |
|
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 14:06:16
|
This error comes before I start to upload. It comes as the pop-up window opens |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 14:14:12
|
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Source Error:
Line 38: Int32 IntFileWidth = UploadedImage.Width; Line 39: Response.Write (FilePath + UploadedFileName); Line 40: Response.End; Line 41: if (PhotoUpload.PostedFile.FileName != "") Line 42: PhotoUpload.PostedFile.SaveAs(FilePath + UploadedFileName);
Source File: f:\ekanal\www1\bio\enbiolog\testforum\pop_upload.aspx Line: 40
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 August 2007 : 14:25:42
|
Response.End;
should be
Response.End(); |
|
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 14:44:29
|
Yes! That was it. And the message is:
F:\ekanal\www1\bio\enbiolog\\testforum\files\~images\16.08.2007 20:44:51_p1010051.jpg
But what do I do now? |
Edited by - Torborg on 16 August 2007 14:59:07 |
|
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 16 August 2007 : 15:14:08
|
The problem must be the dobbel slash (?) Can you spot where in the script that is? |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 August 2007 : 15:52:14
|
The problem is the ':'.
Change this line: String UploadedFileName = MyDate.ToString("MMddyyyyhhmmss") + "_" + UploadedFile.Substring(ExtractPos,UploadedFile.Length - ExtractPos);
to
String UploadedFileName = MyDate.ToString("MMddyyyy_hh_mm_ss") + "_" + UploadedFile.Substring(ExtractPos,UploadedFile.Length - ExtractPos);
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 August 2007 : 16:14:38
|
except use HH not hh otherwise there is a possibilty that you will get a duplicate name as hh uses 12 hr notation rather than 24hr |
|
|
Torborg
Junior Member
Norway
109 Posts |
Posted - 17 August 2007 : 07:04:30
|
Thanks a lot both of you
I did as you said. Now i get a new error:
Server Error in '/bio/enbiolog' Application. --------------------------------------------------------------------------------
Syntax error in INSERT INTO statement. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
Source Error:
Line 177: cmdImgIns = new OleDbCommand(strSQL, conImages); Line 178: conImages.Open(); Line 179: cmdImgIns.ExecuteNonQuery(); Line 180: cmdImgIns.CommandText="SELECT @@IDENTITY As 'Identity';"; Line 181: OleDbDataReader reader = cmdImgIns.ExecuteReader();
Source File: f:\ekanal\www1\bio\enbiolog\testforum\pop_upload2.aspx Line: 179
Stack Trace:
[OleDbException (0x80040e14): Syntax error in INSERT INTO statement.] System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +267 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +192 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +48 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +106 System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +108 ASP.testforum_pop_upload2_aspx.SendToDB(String MemberID, String FilePath, String UploadedFileName, String UploadedDesc, Int32 IntFileSize, Int32 IntFileHeight, Int32 IntFileWidth, String FileType) in f:\ekanal\www1\bio\enbiolog\testforum\pop_upload2.aspx:179 ASP.testforum_pop_upload2_aspx.UploadBut_Click(Object sender, EventArgs args) in f:\ekanal\www1\bio\enbiolog\testforum\pop_upload2.aspx:45 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Topic |
|