Jump to content
Xtreme .Net Talk

Beat-Down

Members
  • Posts

    9
  • Joined

  • Last visited

About Beat-Down

  • Birthday April 25

Beat-Down's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. So as long as I keep the exception from entering the the general exception the program wont end automatically?
  2. I have a Try Catch statement The problem is that if the catch executes the program stops. I want to check and see if its "currently locked by another user" so the error never occures.
  3. Im getting the error "Cound not save; currently locked by another user." the error is occuring at system.data.oledb.oledbcommand.executecommandtexterrorhandling system.data.oledb.oledbcommand.executecommandtextfor singleresult system.data.oledb.oledbcommand.executecommandtext system.............. can anyone help me trap this error so that I dont try to execute my insert statement when the database is locked? Thanks
  4. I have a segment of code that works most of the time but every once in a while I get this error. row handle is invalid My code looks like this (Except its cleaned up) cmFax.CommandText = "SELECT FaxNumber..." drFax = cmFax.ExecuteReader drFax.Read() //drFax Reads 6 items from 0 to 5 //THIS IS WHERE THE ERROR OCCURS (Works 99% of the time) If drFax.IsDBNull(5) Then sServerOutput(3) += 1 Else cm.CommandText = "INSERT INTO ...." cm.ExecuteNonQuery() sServerOutput(0) += 1 sLastFile = sTempFileName sLastFileTime = Now.TimeOfDay.ToString End If:mad: :mad:
  5. where Birthdadte = 15.02.1976 I dont know about you code but you spelled birthdate wrong. and whenever I am trying to get a date from a Datebase my string looks like this "Select * FROM MyTable WHERE Date = #12/11/2003#"
  6. Its running right now The system has 256MB of physical ram PF Usage = 438MB .Net App = 31.948MB Its a little bit larger program but the executable is only .5 MB The program has been up maybe 2 hours. Appears to me that its not freeing anything up.
  7. Something that should be brought up whenever you are considering a move from vb6 to vb.net is the overhead that .net application require. I have not been able to produce an app with vb.net that did not consume 20+MB of memory while running under NT, 2000, or XP, where my VB6 apps maxed out at 6 or 7. I tested this theory. I wrote the smallest app I could think of. It had a text box, and command button, and when you pushed the button it printed Hello World in the text box. It still took 20+MB. Computers that are going to be running .NET apps really need to be much faster with more memory. Well thats my 2 cents
  8. I have a program that reads a list of files, opens each file and extracts the data. What I want the program to do is read the file and dump its contents into a textbox so the user can watch it work and look for errors. But I want to text in the textbox to be updated realtime and not in a large lump sum at the end whenever the loop finishes. any Ideas? Thanks in advance Here is the code Dim i As Integer Dim FileData As String Dim Path As String = txtPath.Text FileListArray = System.IO.Directory.GetFiles(Path & "\", "*.txt") lstDisplay.Items.Clear() If FileListArray.Length > 0 Then ProgressBar.Maximum = UBound(FileListArray) ProgressBar.Minimum = 0 ProgressBar.Value = 0 For i = 0 To UBound(FileListArray) lstDisplay.Items.Add(FileListArray(i)) lstDisplay.SelectedIndex = i ProgressBar.Value = i 'Open File sr = New StreamReader(FileListArray(i)) 'Read File Contents FileData = sr.ReadToEnd 'Parse File txtDisplay.Text = txtDisplay.Text & FileData & vbCrLf txtDisplay.SelectionStart = Len(txtDisplay.Text) 'Close File sr.Close() Next
  9. I am running XP with an exchange server. I am trying to create an app that has email functionality. My problem is that I can send all the email I want within my domain but anything that I try to send outside the domain never gets sent. I dont get any error or faults. The mail just never shows up. Can anyone help me with this please? Thanks Here is my code Dim eml As New System.Web.Mail.MailMessage() System.Web.Mail.SmtpMail.SmtpServer = lblsmtp.Text With eml .To = txtemailaddress.text .Subject = txtSubject.Text .Cc = lblFrom.Text .Body = txtMessage.Text .From = lblFrom.Text Select Case cboPriority.Text Case "Low" .Priority = MailPriority.Low Case "Normal" .Priority = MailPriority.Normal Case "High" .Priority = MailPriority.High End Select .BodyFormat = MailFormat.Text End With If MessageBox.Show("Send email?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then Try System.Web.Mail.SmtpMail.Send(eml) MessageBox.Show("The email has been successfully sent.", "Email", MessageBoxButtons.OK, MessageBoxIcon.Information) Me.Close() Catch ex As Exception MessageBox.Show("The following error occured while sending email:" & vbCrLf & ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End If
×
×
  • Create New...