- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 12
- Posts with Upvotes
- 12
- Upvoting Members
- 11
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
VB'er Since 1996. Also know C#, Entity Framework, MVVM, WPF and a who slew of Microsoft technologies.
- Interests
- Programming; Music; Web
- PC Specs
- I have a PC. Good enough. Who cares?
67 Posted Topics
Re: In case you still want to skip files you cannot delete: Dim files() As String files = Directory.GetFiles("C:\", "*.dav", SearchOption.AllDirectories.GetHashCode) ' Two options for List Box. ' 1. Add all the files you've found and place them in the list box. ListBox1.Items.AddRange(files) ' Interate through the files in the directory. … | |
Re: A few things to check: * Is the file in the programs's Debug folder? C:\Users\Abdueie\Desktop\BMS\Bridge Asset Management\Bridge Asset Management\bin\Debug\ * If not, are you selecting 'Copy to Output'. | |
Re: Use a Try..Catch Block and capture the error. Try ' the procedure Catch Ex as Exception MsgBox (ex.toString) End Try You can also try to print out the parameters. For Each p As OleDb.OleDbParameter In cmd.Parameters Console.WriteLine("Name:{0} Value{1}", p.ParameterName, p.Value.ToString) Next Be sure that if a parameter is blank, empty, … | |
Re: You can place a background on an MDIChild or MDIParent. Look for the BackgroundImage attribute. If you want to use a picture box, use **PictureBox.SendToBack** or **MDIChild.BringToFront**. | |
Re: BY default, and unassigned date will be 1/1/0001. The Table Adapater is saying that although this is acceptable in .NET, Sql Server does not allow dates that are that early (year 1 or 0001). You have to assign the date before you can save the data. uIf yo want, you … | |
Re: Is this XML file an external datasource, or is the file for local data? Serialization is a way to save states of classes. So the XML serializer will serialize with the given name space and will also import some namespaces for internal use. It was designed to save the class … | |
Re: In your table adapter declaration use: MyTableAdapter.ClearBeforeFill = true; | |
Re: By your sql statement the reader would return two fields in one row. min, max. Considering that Log_Type is an integer value: ' ... reader = cmd.ExecuteReader() Dim min, max As Integer ' There will only be one row. While (reader.Read()) min = Convert.ToInt32(reader.GetValue(0)) max = Convert.ToInt32(reader.GetValue(1)) End While MsgBox("Min:" … | |
Re: You can use a text file as a datasource (flat files). But you cannot keep the user from accesing it. You can, however encrypt the data so that they cannot interpret the data it contains. You can also give the file an odd extension so that the user does not … | |
Re: Keep in mind that Form_Load event handler will run on a background thread, and it is not recommended when changing state of objects, but more or less to ready data for the form. More then likely there is an error happening and it is silently throwing an exception (which is … | |
Re: You are not enclosing the date value of the DateTimePicker in your SQL statement in single quotes (mouthfull). In other words > p.doctor_dob=" + dtDOB.Value + "" Should be: p.doctor_dob = '" + dtDOB.Value.ToString() + "'" The new SQL Statement: "SELECT p.doctor_id AS doctor_id, " + "p.doctor_dob AS doctor_dob, " … | |
Re: Use the tools you have learned in your classes. Outline the design of the project: * **Customers** Name Address ... * **Orders** Order Number Item Name Item Count Item Price / Container ... Using that structure, you have a design you can follow: * 2 Forms, 1 For Customers, 1 … | |
Re: This line of JIT says it all. > System.Exception: Function evaluation timed out. It looks like VS timed out trying to create a window handle for the viewer (which is a little window that shows up after you click the magnifying glass). This could be due to low memory, or … | |
Re: SQL Sever Express uses (local)\SQLExpress or .\SQLExpress Please use this as the data source. Then you can either create or add an existing database file (mdb) | |
Re: There may be a difference in how .NET is authenticating with the LDAP server. Are you using a web config (MembershipProviders) to authenticate, or are you hard coding the credential check on the server? Possible causes are: * Credentials to the LDAP Admin account have changed (I believe the newer … | |
Re: You can use [HTML Workshop](http://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx). It compiles HTML Files into a chm. Next, I would use [NotePad++](http://notepad-plus-plus.org/) to create your HTML help pages. Both downloads are free. After you create the file, you then can link to it in your project. YOu can read more on that [here](http://msdn.microsoft.com/en-us/library/aa984402(VS.71).aspx). What it … | |
Re: Are all the fields filled. The error indicates that the SQL is incorrect. If a field is blank your SQL will look something like: Select * from MyTable where ID = since the ID field is blank, your SQL will not be valid. This will be the same for the … | |
Re: By the looks of the text file, you can use a System.IO.ReadLine method to read the lines of the file. Then, when you find a line that begins with 'SITUATIONAL', you split the line into records. continuing TnTinMN example at line 8 you can place: Dim records = line.Split(vbTab) ' … | |
Re: The SQL image datatype is obsolete. Use the SQL binary datatype in the Database table; which is essentially a byte array. You can also use a SQL text datatype and convert the image bytes into a string: string imageBytesString = Convert.ToBase64String(VEHIMAGE); Text datatypes cannot be indexed and are used for … | |
Re: You can use a For Each Loop to iterate through the array. For Each record As String In data ' Do some data processing... Next | |
Re: For multiple keys you can use the Or operator. Private Sub txtLoginName_KeyDown(sender As Object, e As KeyEventArgs) Handles txtLoginName.KeyDown ' If the user presses the left arrow or the enter key. If e.KeyCode = Keys.Left Or e.KeyCode = Keys.Enter Then ' navigate to the next controls text box. MyNextControl.MyNextControlsTextBox.Focus() End … | |
Re: You will need to hold the properties at the application's scope. By that I mean you will want to create a Module, and place the propeties there. Example: Public Module Answers Public Property Question1GivenAnswer As String Public Property Question1CorrectAnswer As String End Module You should do this for every question, … | |
Re: I would also recommend encrypting at the very least the password by using using System.Cryptography.AESManaged, or similar. | |
Re: I would have to agree with tinstaaf. Although I would place the Preserve keyword with the ReDim statement. | |
Re: It sounds like you do not have a ODBC (Open Data Base Conection) setup on the other machine. You may have to find the name of the OBCD used on the deveopement computer to be sure the names are right (which I assume the name is IM002). You can setup … | |
Re: I think you get that error when the FTP client does not have Write Permissions to the folder. So you send the file, then the ftp client request that the uploade was successful, the server, says "What file?" | |
Re: If you want to pull the informaiton from a ListViewItem and display it in another form, then you just get the SelectedItem in the ListView. Dim MySelectedItem = MyListView.SelectedItem From there you can pull your data. Dim MyFirstColumn As String = MySelectedItem.Text ' This is the first column. Dim MySecondColumn … | |
Re: The above code appears to work, but you also have to set the control's background to transparent. The code Jim provided tells the form that there are controls on the form have a color of Transparent set. As far as an *Editable Label*, you can use a text box that … | |
Re: Do you have the connectionstring you are trying to call in the .config file? Since you are providing a conneciton string name, the connection manager is trying to find the connectionstring with that name. The .config file you provided only has the "default" string, sort of speak. Have you tried … | |
Re: Any procedures that are executed in the Form_Load event will continue to execute even if there is an error. Also, you cannot close a form when it is Loading. The Close event will only fire after the Load event is complete. You can however, use a Shared Sub Main statement … | |
Re: IO.Directory.CreateDirectory(USERPROFILE & "\Desktop\"username) I see an error. There is no & between "\Desktop\" and username IO.Directory.CreateDirectory(USERPROFILE & "\Desktop\" & username) You should also place all the calls outsite that event handler. You will be taking a memory hit. The event will fire everytime the text changes. So, as you type … | |
Re: Use the built in functions of the Date type. Date.ToShortDateString Date.ToLongDateString ' in your case myDate.ToShortDateString You can also use the format function to write out your own. Date.ToString("dd/mm/yyyy") | |
Re: If you want to set a Default value for your property look into the [DefaultValue Attribute](http://msdn.microsoft.com/en-us/library/system.componentmodel.defaultvalueattribute.aspx). I assume you want to have a value provided when you first add the form at design-time. | |
Re: First off, you are saying the operation is successful if there is an error (Line 35). I don't get that. I would place a Msgbox that gets the ex.ToString property there so you can see the line number of the error as well as the error itself. Next, you are … | |
Re: How about a Try...Catch...Finally block Also, you can create some custom exceptions that inherit the system.exceptions class. Then for a particular error, throw that exception. Public Class SQLCodeNullException Inherits System.Exception ' A custom exception End Class ' ... Try ' My code that throws variaous errors Catch sqlEX As SqlCodeNullFormatException … | |
Re: I remember there are some classes in Reflection.Emit namespace that can create dynamic objects that are used at runtime. You do not have to recompile for the classes to be used. However, it requires a lot of knowledge in VB.NET, and is not for the faint of heart. Here is … | |
Re: You are talking about a lot of math. The data in an image file consists of Color, Red, Green, and Blue values. Some images also contain alpha. The bits are lined in an algorithm that varies slightly from image to image. You can however look in open source projects and … | |
Re: Spam filters will usually kick out anything that has certian keywords (especially in the title) or not enough information in the body as well as improper HTML tags (HTML mail). | |
Re: First off, the methods in your class are sub procedures, not functions. Functions return a value or type, while sub procedures do not (really they return nothing). But enough of the lecture. On with the question at hand: By call them,do you mean from another class? If so, you first … | |
Re: I would look here for some examples. [TechOnTheNet - SQL Delete Statement](http://www.techonthenet.com/sql/delete.php) | |
Re: This sounds like an interesting application. I just need some clarification... We're both in the same car, I just want to know where what road we're on, and if the road leads to green pastures :-). From what I am getting, the root node determins the LNode and RNode: |Lnode|Root|RNode|` … | |
Re: A little PICNIC error? :-) Note: PICNIC = Problem In Chair, Not In Computer. | |
Re: I would take a look here. [MSDN: DataGridView.Rows Property](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.rows(v=vs.100)). Half way down the page it will explain how to modify values in the Data Grid View. You can also change the value in the datasource. Whether that be a DataSet or a Class. | |
Re: I have to say that Mastering VB.NET is a good book, but I don't recommend it for the novice. It would recommend Clearly Visual Basic by Diane Zak. I will guide you through building a General User Interface (or GUI [pronuced gooey]) as well as describes the various controls and … | |
Re: I see logic errors in the *Save* function. You care calling **myconnection.Open** method on a connection that is already open. This is where you are getting the error: *The connection is not closed.* The code on Line 6 will do for the entire method since you close it in Line … | |
Re: For multiselected items. You use: Dim selectedItems = MyListView.SelectedItems ' iterated through the selected items For Each item As ListViewItem In selectedItems ' get data from the third column Dim MyData = item.SubItems(2).Text Next Column 1: ListViewItem Column 2: ListViewItem.SubItems(0) Column 3: ListViewItem.SubItems(1) | |
Re: You have a CSV file, or a Comma Seperated Value file. To get the highest and lowest dates form the file, after opening and reading it into an arra, of course, is to simply use sort: ' Sort the array Array.Sort() Dim HighestValue = Array(0) ' First value is the … | |
Re: If the type is of DateTime (this includes Date) just insert it like so. Dim MyHireDate As Date Dim MyEndDate As Date cmd.Parameters.AddWithVlue("@MyHireDate", MyHireDate) cmd.Parameters.AddWithVlue("@MyEndDate", MyHireDate) | |
Re: From looking at your code: Line 6: >tbStudent = sqlDataset.Tables("Major") Is sqlDataSet filled with data? Line 17: >drSubject = tbStudent.Rows.Find(major) Is your TextBox1 filled? Line 31 - 33 >TextBox1.Text = drSubject.Item("MajorName") TextBox2.Text = drSubject.Item("Departement") TextBox3.Text = drSubject.Item("Suject_Name") You pull data from Line 21, and read it in Line 27 - … | |
Re: First thing I would do, is when you catching the exception (**Catch ex As Exception**), you are not displaying the exception. Another thing I see is where you are validating the data and displaying the error. You should exit the method when the validation fails. This way you don't try … |
The End.