200 Posted Topics

Member Avatar for Baillie11

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 …

Member Avatar for TomW
-1
138
Member Avatar for yorro

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 …

Member Avatar for TomW
-2
6K
Member Avatar for s.chauke

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 …

Member Avatar for s.chauke
0
526
Member Avatar for ITfav

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

Member Avatar for TomW
0
318
Member Avatar for leroi green

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 …

Member Avatar for leroi green
0
150
Member Avatar for Atove
Member Avatar for TomW
0
115
Member Avatar for wallance

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 …

Member Avatar for TomW
0
135
Member Avatar for babbu

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.

Member Avatar for TomW
0
392
Member Avatar for Denxerator

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.

Member Avatar for Geekitygeek
0
241
Member Avatar for lil_Is

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 …

Member Avatar for babbu
0
146
Member Avatar for Nattynooster

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 …

Member Avatar for TomW
0
170
Member Avatar for greenbluekidz

Unfortunately no. You can open older versions of coding in 2008 but can not open 2008 in older versions.

Member Avatar for TomW
0
71
Member Avatar for flit07

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 …

Member Avatar for flit07
0
201
Member Avatar for NorthDakota

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 …

Member Avatar for TomW
0
161
Member Avatar for gianrocks

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 …

Member Avatar for dapsin999
0
167
Member Avatar for webwired

[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.

Member Avatar for TomW
0
293
Member Avatar for bigtreeworld

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

Member Avatar for bigtreeworld
0
96
Member Avatar for dre-logics

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]

Member Avatar for TomW
0
104
Member Avatar for Bradoirs

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 …

Member Avatar for TomW
0
523
Member Avatar for A.Najafi

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 …

Member Avatar for A.Najafi
0
145
Member Avatar for omotoyosi

[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.

Member Avatar for TomW
0
76
Member Avatar for cjjack88

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 …

Member Avatar for TomW
0
882
Member Avatar for mrmodest

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 …

Member Avatar for Vineeth K
0
111
Member Avatar for danielagaba

[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 …

Member Avatar for TomW
0
285
Member Avatar for Demon4231

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, …

Member Avatar for GeekByChoiCe
0
76
Member Avatar for samir_ibrahim

Replace or with a comma [Code] Case "System.Int32", "System.Int64" [/Code]

Member Avatar for samir_ibrahim
0
151
Member Avatar for awestove

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.

Member Avatar for kvprajapati
0
112
Member Avatar for gedkins
Member Avatar for gianrocks

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

Member Avatar for gianrocks
0
116
Member Avatar for bonny343

Looking in the help file will show how to add and retrieve combobox items.

Member Avatar for Pgmer
0
115
Member Avatar for navinkumar
Member Avatar for wetlife00

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.

Member Avatar for TomW
0
108
Member Avatar for victor0101

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]

Member Avatar for TomW
0
92
Member Avatar for Mash'Funk

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")

Member Avatar for TomW
0
87
Member Avatar for danielagaba

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]

Member Avatar for TomW
0
84
Member Avatar for Merovingian

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.

Member Avatar for sknake
0
145
Member Avatar for haxor98

[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 …

Member Avatar for TomW
0
233
Member Avatar for emint

Read the text file into a dataset/datatable and then simple set the datagrid's datasource = to the datatable DataGrid1.DataSource = myDataSet.Tables(0)

Member Avatar for TomW
0
68
Member Avatar for yorro

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 …

Member Avatar for yorro
0
469
Member Avatar for jhill1979

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 …

Member Avatar for TomW
0
116
Member Avatar for lovelysri16

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()

Member Avatar for TomW
0
129
Member Avatar for doomfrawen

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.

Member Avatar for doomfrawen
0
211
Member Avatar for iwaqasi

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

Member Avatar for samir_ibrahim
0
132
Member Avatar for omotoyosi

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]

Member Avatar for TomW
0
79
Member Avatar for avgVBUser

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 …

Member Avatar for avgVBUser
0
120
Member Avatar for Alphard

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 …

Member Avatar for Alphard
0
77
Member Avatar for Maulth

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.

Member Avatar for GeekByChoiCe
0
855
Member Avatar for Rofling Waffles

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.

Member Avatar for CodeDoctor
0
98
Member Avatar for chanlichin

[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.

Member Avatar for TomW
0
260
Member Avatar for Atove

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.

Member Avatar for TomW
0
162

The End.