Jump to content
Xtreme .Net Talk

tinomesa

Members
  • Posts

    13
  • Joined

  • Last visited

Personal Information

  • Occupation
    Business Analyst / Developer
  • Visual Studio .NET Version
    vs .net enterprise architect
  • .NET Preferred Language
    vb.net

tinomesa's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello, I have an application that requieres the printing of a form. The form to be printed is static, (no updates, writes or modifies). The form can be PDF or Word based and the requirements is that once a user click on a link or button from a page, the form should print or show as a print view, in the clients machine and using the default printer on the client's PC. If anyone has an example or knows a good article on this I would really appreciate it if you share!! Thanks!!
  2. Hello, I need to get today's date (-365) in a shortdate type string, so that I can delete records older that a year (or so) from a DB. I tried Dim myyear As String = CStr(Today.Month) + "/" + CStr(Today.Day) + "/" + CStr(Today.Year - 1) Dim targetdate As Date = CDate(myyear).ToShortDateString() But it seems costly, is there any other built function to do this? Thanks:)
  3. After handling a large file the worker process recycles... I installed the hot fix (NDP10_SP_Q321884_En), but the problem remains. After I populate a database using "heavy string manipulation", my memory usage goes sky high, my cpu utilization goes to 100% the process writes the file OK, but the next statement does not execute and the browser (IE6) displays a done message on the satatus bar. I checked the running threads and aspnet_wp is still present but consumes no CPU cycles (I assume It has recycled since I can not reach the next statement that I trapped with a breakpoint. If I decrease ther file size from 600k to 300k the process works as expected. Any Ideas? any experiences of the like? :eek:
  4. mutant How could I have doubted you..... Shame on me!!! The length actually returns the number of bytes so you are correct!!! Seriously thanks to all for the help!!!
  5. Thanks for participating PlausiblyDamp, the size is consistent at 2 Bytes, It would work to check for size <= 2.......but how does the system diferenciate between 2kb and 2bytes..... 2KB maybe a correct file (not empty) that I do not want to overwrite. any ideas?
  6. Thanks for the response Mutant, But as I said above the file size is being reported as 1kb. I think I am going to have to read a portion of the file an make a determination on wheater is null or not....... Maybe one of you experts can tell me how "peek" works... and what it returns if there is nothing there to peek at. Thanks
  7. Greetings, I have a program that iterates through a series of text files and if the file size is 0 it writes to the file. The problem is that I have text files that are empty but show up as being 1kb in size..... Is there a way to find out if the file is empty preferably without the expense of "reading it" ? Thanks,:D
  8. I'd like to use SQL 2000 more, but I can justify it to mgmt just yet.
  9. I am writing a .net application with an access 2000 data store. My code creates a table on the fly, I have a field that needs to be 11 characters long and right justified, if I manually enter Fixed in the fields format property box it works great, but I need to be able to do it programatically. This qery seems to run OK but it does not alter the format property??? UPDATE TinoMesa SET [PC-IN-RETAIL] = FORMAT ([PC-IN-RETAIL],'Fixed'); this one does not work either (no error messages either...???) UPDATE TinoMesa SET [PC-IN-RETAIL] = FORMAT$ ([PC-IN-RETAIL],'Fixed'); please help :confused:
  10. Greetings, I have an application that reads data from a dataset and writes to a text file a formatted version of the data. I have two numeric (double) type fields that I need to write to the file while preserving any spaces to the left of the number (this is requiered by the program that uses the file as input). For example the text is written as "-1000.45" instead of " -1000.45" It needs to be 12 spaces and right justfied. I am reading the data like this..... Public Function WriteTemp(ByVal uid As String) code removed for clarity For i = 0 To _DS.Tables(0).Rows.Count - 1 For innerloop = 0 To 8 line = line + CStr((_DS.Tables(0).Rows(i).Item(innerloop))) Next innerloop = 0 line = line + " " For innerloop = 9 To 28 line = line + CStr((_DS.Tables(0).Rows(i).Item(innerloop))) Next ezwriter.WriteLine(line) line = "" Next ezwriter.Close() End Function
  11. Hello! I am trying to rename a sheet in an excel workbook. I have uploaded the sheet from the client, and I have saved it as a combination of the userID and a number. the problem is that I need to rename "Sheet1" or whatever the user named it to something else. I don't even know where to begin.... Any ideas?? Upload / saved Code: Sub uploadFile(ByVal source As Object, ByVal e As EventArgs) Dim mytempdb, TempTable As String mytempdb = Request.Cookies("APLoad_User").Value.ToString() TempTable = mytempdb.Remove(mytempdb.LastIndexOf(" "), 1) If Not IsDBNull(fileToUpload.PostedFile) Then Try fileToUpload.PostedFile.SaveAs("d:\inetpub\wwwroot\apload\apload\" + TempTable + ".XLS") Dim html As String = "<p>File uploaded successfully on the web server</p>" :confused: :confused:
  12. Hello WebJumper, I understand what you are saying, but it seems to me that there must be a way to send a response to the browser while or (prior to) processing the request. I am thinking that it must be in a asynchcronous manner. I got the following code now but I get a message that the user control I am trying to load is not in the same application context as the request being process (I think) Public Sub thebegining(ByVal s As Object, ByVal e As EventArgs) Dim app As HttpApplication = CType(s, HttpApplication) Dim mycontrol As UserControl = New UserControl() mycontrol.LoadControl("splash.ascx") app.Context.Current.Items.Add("Item1", mycontrol) app.Context.Response.Write(mycontrol) . . . Again you are probably wrigth! Anyways, If anyone can tell me why I am geting this error message... [HttpException (0x80004005): The virtual path '/splash.ascx' maps to another application, which is not allowed.] System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir, Boolean allowCrossAppMapping) System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) +99 System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath, String inputFile, HttpContext context) System.Web.UI.UserControlParser.GetCompiledUserControlType(String virtualPath, String inputFile, HttpContext context) System.Web.UI.TemplateControl.LoadControl(String virtualPath) APLoad.splashcntl.thebegining(Object s, EventArgs e) in C:\Inetpub\wwwroot\APLoad\Classes\splashcntl.vb:24 System.Web.SyncEventExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87 Thanks!!
  13. Greetings, The following may be imposible to do, but Iwould appreciate any help or comment ..... I have an ASP.Net application with heavy database workload, I am trying to load a user-control onto the requesting page thru an HttpModule onBeginRequest event, I am planning on disposing of the object onRequestEnd. The purpose of this is to present the user with a message "Please Wait .... Data Procesing" and an animated gif packaged into a control, while the request is being processed. This is the code so far in the Module.... Public Sub thebegining(ByVal s As Object, ByVal e As EventArgs) Dim mycontrol As splashcntl = New splashcntl() Ctx.Current.Application.Add("splashcntl", mycontrol) End Sub I can't flush the response here because the session ID has not yet been written to the cookie, and I am not sure how to get this object to the requesting page pre-procesing. If you know a way or if you know a different approach I would appreciate your direction.
×
×
  • Create New...