200 Posted Topics
Re: For the most part I absolutely agree with Sknake above. However in certain situations, such as working with the same group of records over & over that Im not updating only filtering for a result, I do find it useful to hold the date in memory rather then run a … | |
Re: A list or ListArray can be returned from a function as Ryshad suggests above. Another option is you can create a user defined structure and pass that back from your function. [Code=VB.Net] Public Structure Student Public Name As String Public Age As Integer Public GradePointAverage As Decimal End Structure Public … | |
Re: I'm not sure what exactly your question is here? Also can you give more details about the id number itself and what your trying to accomplish? Is this a barcode? One suggestion right off the top is to change this into a Function to return true if valid and false … | |
Re: Move your static countdown variable to form level. In the btnReset click event, assign the new time value of 3 secons to your form level variable (m_CountDown) And re-enable your timer if necessary | |
Re: You can do this as a class or even as a user defined structure (just discussed something similar [URL="http://www.daniweb.com/forums/thread226768.html"]here[/URL]). However for this particular situation I would suggest creating a Typed Dataset with a DataTable inside that meets each of your fields. There are many benfits from adding it to a … | |
Re: Dont forget to mark the thread as solved and rep babbu for helping ya. | |
Re: You can do this by creating a macro in Excel itself but then it kinda defeats your VB plug-in... Cheat Tip: When trying to figure out VB syntax for automating Excel, I'll set it to record a macro and then perform whatever function I want. Then all I have to … | |
Re: That much looks correct, I'm assuming the error is in your actual insert statement connected to your adapter. Can you provide that query? Also add the exact error message that you are receiving. | |
Re: Your syntax is correct. You do not have the coding in the Form_Load event, you have it in the button click event, you must click the button before you should see the changes. | |
Re: Concatenating your query strings is poor coding. It is much better to use parameters. Take a look at sqlCommand.Parameters.AddWithValue. If you have any additional questions about it just let me know. Another consideration is putting your query directly into a stored procedure in your database. Then you just have to … | |
Re: Try this. And you can set the TextBox's ReadOnly property to true so that the user can not edit it. I did it in code below but you can set it right in the properties window so its not re-running every time (although it wont hurt anything just isnt needed … | |
Re: Unfortunately no. You can open older versions of coding in 2008 but can not open 2008 in older versions. | |
Re: There are many options for passing values. 01) you could use a public variable in a module file 02) You can pass it thru the constructor of the new form 03) You can create public properties in the new form and pass them thru that 04) You can access the … | |
Re: Im not sure exactly what your question is here... The title mentions writing to a file but you dont mention that in your post. Not sure what your trying to get but you can add icons to a listview control. This might be what your after: [URL="http://msdn.microsoft.com/en-us/library/s8z85th0.aspx"]How to: Enable Tile … | |
Re: Keeping pictures in a database is not a good idea. It is much better to store the path to the picture file and use that to load your pictures. Pictures can make your database grow very large very fast. As an example, every time you update a record, even though … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/ks9f57t0(VS.80).aspx"]Retrieving Identity or Autonumber Values [/URL] A bit of a pain to do with using a dataadapter to execute the queries but the above link will show you an example of doing so. | |
Re: There is a complete sample available for download in the help file and also a detailed example of working with the ping class. Just type in "Ping" in the help files index | |
Re: Using CultureInfo you can display the numeric values to specific formats. [URL="http://msdn.microsoft.com/en-us/library/syy068tk(VS.71).aspx"]Formatting Numeric Data for a Specific Culture[/URL] | |
Re: It will all depend on what the rest of your coding looks like. For example if I retrieve data from a table named Owners, it doesnt mean i put it in a dataset or datatable in the program thats named the same. I'm assuming this is the problem here. Also … | |
Re: No, there is no built in functionality in .Net for adding these features to a listview control. Although if you google the subject you can find some examples where people added coding in an attempt to add these features but I wouldnt even recommend it; all the ones I looked … | |
Re: [Date Sent] should be a date/time column, I dont understand why your converting the entire column to date.... Also try applying pound signs (#) before & after the date instead of single quotes. | |
Re: If your only returning a single value, you do not need to use a reader object or the ExecuteReader method. I would suggest using ExecuteScalar instead, it will return the singular value and use less resources. The help file will show detailed info with an example. If you still need … | |
Re: This seems to be some type of class project so what are you learning if one of us writes the entire thing for you? I'd be glad to help in any area of it that your having problems or help critique it when your done. Wow you could have coded … | |
Re: [QUOTE=danielagaba;995035]hi i'm trying to add a feature to an application where users of my application (installed on different computers) can share access db files when updates are made by one user but dont know where to start. Is there a tutorial i could look at or sample source code?[/QUOTE] If … | |
Re: Assign each of the new textbox's a name when creating them. Then in your sub, loop thru the textbox controls on the form until you find the one with the name you want. [Code] Dim txtLetter(0) As TextBox txtLetter(0) = New TextBox txtLetter(0).Name = "txtLetter1" Me.Controls.AddRange(txtLetter) txtLetter(0).Location = New System.Drawing.Point(121, … | |
Re: Replace or with a comma [Code] Case "System.Int32", "System.Int64" [/Code] | |
Re: I dont know what the values are that you are passing. Are you sure that the control is not being added off the sides of the form? Run your control count after the loop to see. | |
Re: Look up working with Stored Procedures and "Output Parameters" | |
Re: You using a Data[COLOR="Red"]Reader[/COLOR] in this coding; hence you can only read the values not write back to the database.... You need to spend some time looking through some tutorials about working with datasets | |
Re: Looking in the help file will show how to add and retrieve combobox items. | |
Re: Amazon has plenty of books on how to do dis... | |
Re: You need to create an Array variable. Also you should turn on Option Strict & Option Explicit to have the design environment show you some mistake you are making with not explicitly converting your values to the proper datatypes. | |
Re: You can assign the dataset/datatable as the DataGridView's DataSource and filter the results so that it shows only the selected record from the combobox. [Code] Dim m_dtData as New DataTable m_dtData = FillDataTableCode DataGridView1.DataSource = m_dtData Private Sub Combobox1_SelectedIndexChanged() m_dtData.DefaultView.Filter = "ColumnName = 'Value'" End Sub [/Code] | |
Re: The listbox has a FindString and FindStringExact methods available to search the items. intIndex = ListBox2.FindStringExact("YourSearchItem") If intIndex >= 0 then msgbox("Item Already Exists") | |
Re: In your parameters you have several different datatypes defined. However each of the values that you are passing to them is text. You need to convert and assign the proper datatype values to these parameters. Ex: [Code] '.Add("@months", OleDbType.Integer).Value = txtMonth.Text .Add("@months", OleDbType.Integer).Value = [COLOR="Red"]CInt([/COLOR]txtMonth.Text[COLOR="red"])[/COLOR] [/Code] | |
Re: First of all, you should use parameters instead of concatenating query strings. That in itself might resolve the issue but either way you can add brackets around the [table name] so the database knows. | |
Re: [Code] Dim m_datTarget As DateTime = CDate("09/21/2009 7:00PM") Private Sub Timer1_Tick(...) Handles Timer1.Tick Dim tsDiff As TimeSpan If m_datTarget < Now Then Timer1.Enabled = False 'Put your shut down code here MessageBox.Show("They end...") Exit Sub End If tsDiff = m_datTarget.Subtract(Now) Label1.Text = String.Format("Time Remaining : {0}", FormatElapsedTime(tsDiff)) End Sub Public … | |
Re: Read the text file into a dataset/datatable and then simple set the datagrid's datasource = to the datatable DataGrid1.DataSource = myDataSet.Tables(0) | |
Re: Add a module file to your project and change the declaration of your subs and functions to public in the module file. And if your coding in the seperate file is naming something specific on your form such as Label1.Text =; you need to specific in the module the name … | |
Re: Thats an odd struture for a data file (two lines per record). Usually its one line of data per record with some type of delimiter or fixed length to define each of the fields. If your sure that is the right file structure, GeekByChoiCe gives a good example of how … | |
Re: You can set the visible properties back and forth appropiately. Another way is to set the z-order of the control to be layered on top of the other control. PictueBox1.BringToFront() | |
Re: You could create a loop to test each char to see if it is a number or mathmatical operator. Also keep in mind with testing with methods such as IsNumeric it doesnt see decimal points as numeric. | |
Re: Are the same mapped drives available while logged on as a user? If its a security error, you need to lower the security settings on your lan | |
Re: Its kind of a real pain in the butt to sort a listview besides its typical sort property that is provided. You need to define some functions in able to sort specific columns. An example can be found at this link on [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemsorter.aspx"]MSDN[/URL] | |
Re: You should always open & close the connects as needed and not leave it open for the life of the program. Otherwise you are not optimizing connection pooling. You call to your stored procedure was made with a dataadapter. When you use a dataadapter, it will actually open the connection … | |
Re: Indirectly, yes. A datagrid doesnt actually contain data it only displays the data from the datasource you have attached to it. For example, if you populate a dataset, datatable, array etc and assign it to the datagrids datasource you can see the data. The user can then select a row … | |
Re: You can set you form's topmost property to true, to keep it above other forms. You can set the form's opacity property by percentage to see thru your form. | |
Re: You defined & attached an insert command to your dataadapter. Now when you call the da.Update method, it will look for any new records in your dataset and insert them into your database. The problem of course is you never added any new records into the dataset. | |
Re: [CODE] Select Distinct DATENAME(mm, CONVERT(CHAR(19), [dates])) AS [dates] From.... [/CODE] That will fomat the name of the month to be returned. However concatenating query strings like that is very poor programming format. You should look into how to convert that and use parameters. | |
Re: That is a really awfull way of trying to get your results. As to your answer though, your function is returning a string datatype of a date but you need to apply an actual datetime datatype to your datetimepicker.value. |
The End.