95 Posted Topics

Member Avatar for cirno

Hi! Is this line causing error ???? curdate = CType(drdate.Item("now()"), Date) The first code block you attached is the [U]stack trace[/U], which helps to get information about the error occurring in our program.

Member Avatar for cirno
0
208
Member Avatar for tendaimare
Member Avatar for MaddTechwf

Hi! Found this code: [CODE]Function objGetComputerSystem() As ManagementObject Dim objectQuery As New ObjectQuery("select * from Win32_ComputerSystem") Dim searcher As New ManagementObjectSearcher(objectQuery) Dim computerSystem As ManagementObject Dim computerSystemOut As ManagementObject computerSystemOut = Nothing For Each computerSystem In searcher.Get() computerSystemOut = computerSystem Exit For Next computerSystem Return computerSystemOut End Function Function renameComputer(ByRef …

Member Avatar for Unhnd_Exception
0
734
Member Avatar for steven8579

Hi! You populate value of lstResult2 here: (Read comment within code) [CODE] void ShowValues() { lstResult2.Items.Clear(); ' this clears the previous value for (int i = 0; i < values.Count; i++) lstResult2.Items.Add(values[i]); lblSum.Text = values.Count.ToString(); }[/CODE]

Member Avatar for ShahanDev
1
2K
Member Avatar for tim8w

Hi! I did it like the attached code, I used CommandButton, you can use ToolBar's Button and set its state to "Pressed" and "UnPressed": [CODE] Private Sub Bold_Click(sender As Object, e As EventArgs) If Not richTextBox1.SelectionFont.Bold Then richTextBox1.SelectionFont = New Font(DirectCast(richTextBox1.SelectionFont.Clone(), Font), richTextBox1.SelectionFont.Style Or FontStyle.Bold) Else richTextBox1.SelectionFont = New Font(DirectCast(richTextBox1.SelectionFont.Clone(), …

Member Avatar for ShahanDev
0
162
Member Avatar for Viperino

Hi! you need to write your file in a proper manner to retrieve information back. For Primary number, in a .txt file there is no way to create a column having type "Autonumber" you need to read the file and extract the max ID and when inserting increment the ID …

Member Avatar for Viperino
0
432
Member Avatar for baldowz

Hi! These links can help you: (if need help let me know) [URL="http://www.codeproject.com/KB/grid/Drag_Drop_from_GridView.aspx"]http://www.codeproject.com/KB/grid/Drag_Drop_from_GridView.aspx[/URL] [URL="http://www.dreamincode.net/forums/topic/48140-drag-and-drop-in-datagridview/"]http://www.dreamincode.net/forums/topic/48140-drag-and-drop-in-datagridview/[/URL] [URL="http://www.codeproject.com/KB/cpp/DataGridView_Drag-n-Drop.aspx"]http://www.codeproject.com/KB/cpp/DataGridView_Drag-n-Drop.aspx[/URL] *EDIT**** This will give you an idea how you can accomplish the task. You should execute these project(s) OR code and see the result first.

Member Avatar for baldowz
0
83
Member Avatar for Dragon840215
Member Avatar for mrbungle

In richtextbox1.TextChanged Event you should check that it contains your desired text or not, for that use .FIND() method to get index of it, then select then whole keyword and color it like this: [CODE]Dim i As Integer = richtextbox1.Find("Not Found AS OF:") 'See other constructors also richtextbox1.Select(i, "Not Found …

Member Avatar for mrbungle
0
778
Member Avatar for Keith@LPG

Hi! >>>>I have setup seven fields in my database as bits and in data sources I have labeled them as CehcekBoxes. However, I can not bind a CheckBox to a field. You can fill dataset from your database and can create a datagridview column. Then set its "DataPropertyName" property to …

Member Avatar for Keith@LPG
0
98
Member Avatar for crispexops

Hi! Please check this: [URL="http://www.codeproject.com/KB/vb/InsertUpdateDeleteSearch.aspx"]http://www.codeproject.com/KB/vb/InsertUpdateDeleteSearch.aspx[/URL]

Member Avatar for ShahanDev
-1
4K
Member Avatar for Baka_Kuma

See this link how to delete/update result(s): [URL="http://www.codeproject.com/KB/vb/InsertUpdateDeleteSearch.aspx"]http://www.codeproject.com/KB/vb/InsertUpdateDeleteSearch.aspx[/URL]

Member Avatar for ShahanDev
0
678
Member Avatar for gerk45

Hi! Please check these links: [URL="http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update%28v=vs.71%29.aspx"]http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update%28v=vs.71%29.aspx[/URL] [URL="http://www.daniweb.com/forums/thread92528.html"]http://www.daniweb.com/forums/thread92528.html[/URL]

Member Avatar for ShahanDev
0
113
Member Avatar for adrianSigamoney

If you still have some time then I can help you: (please check the code I provided in a separate Project) [CODE] '''''''' Your Dynamic textboxes, this will be created at runtime. Dim tb1 as new TextBox() With {.Text="adrian"} Dim tb2 as new TextBox() With {.Text="sigamoney"} Dim tb3 as new …

Member Avatar for ShahanDev
0
71
Member Avatar for Ala Ayesh

try this: [CODE]Thread.Sleep(17*1000 / (1000*1000*1000))[/CODE] argument takes time in millisecond. So, 3 times 1000 is to create 10^9 and 17*1000 is to remove its arguments' millisecond.

Member Avatar for Teme64
0
196
Member Avatar for karthikn.cecri

You can Publish your application from menu "Build->Publish YourApplication". It will create .exe file for installation. Is this what you are looking for ???

Member Avatar for ShahanDev
0
191
Member Avatar for amitganguly2002

Goto "Properties Window", [U]select DatagridView[/U] and changed the property "ReadOnly" to "true". This will lock all rows and all columns.

Member Avatar for Polongo
0
95
Member Avatar for simonfoley

Hi! Change the For Loop with this: [CODE] For Each row As DataRow In dataCity.Rows ListBox1.Items.Add(String.Concat(row.ItemArray)) Next[/CODE] Actually the for loop "adatapost" suggested will just take "string", so if you have integers in row it won't include it in array. So, you can use [B]"String.Concat()"[/B] method for this purpose.

Member Avatar for simonfoley
0
309
Member Avatar for like_bilal02

Hi! This can help you: [CODE] Dim defaultBtnSize As Size Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load defaultBtnSize = Button1.Size End Sub Private Sub Button1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter Me.Button1.Size = New Size(100, 50) End Sub Private Sub Button1_MouseLeave(ByVal sender …

Member Avatar for ShahanDev
0
215
Member Avatar for yasho

Hi! Create a "DataGridViewCellStyle" object and set its "format" according to your need: [CODE] Dim style As New DataGridViewCellStyle() style.Format = "dd-MM-yyyy" DataGridView1.Columns("Date").DefaultCellStyle = style[/CODE] A simple demo: (change connectionstring, cmdtext to make this sample working) [CODE] Dim con As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Application.StartupPath & "\db1.mdb" & ";") …

Member Avatar for ShahanDev
0
112
Member Avatar for maty241

Do you mean that you have textboxes in your forms and you want to store information in a text file when Form closes and retrieve information back when form loaded.

Member Avatar for ShahanDev
0
36
Member Avatar for gurupts

Hi! >>> i added the database in project How did you add ??? you mean from menu "Data->Add New Data" Source ??? because it makes DataSet bydefault otherwise we need to go with OleDb class to work with it.

Member Avatar for ShahanDev
0
593
Member Avatar for saurabhtiwari

You should write your for loop like this: [CODE]for (int i = 0; i < (dt.Rows.Count)[B] - 1[/B]; i++) //Since index is zero based. double ext = Convert.ToDouble(dt.Rows[i][B].Item(0)[/B]); //Value of first cell will be provided to convert[/CODE]

Member Avatar for ShahanDev
0
114
Member Avatar for like_bilal02

You could try like this: 'To select top 2 rows from 2 out of 6 columns Select Top(2) Column1, Column2 from YourTable 'To select all rows from 2 out of 6 columns Select Column1, Column2 from YourTable

Member Avatar for ShahanDev
0
65
Member Avatar for paulablanca

Hi! Another approach could be using ColumnName instead of ColumnIndex: Check this: [CODE] Private Sub DataGridView1_CellEndEdit(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit If DataGridView1.CurrentCell.OwningColumn.HeaderText = "CustID" Then If DataGridView1.CurrentCell.Value <> Nothing AndAlso Not IsNumeric(DataGridView1.CurrentCell.Value) Then MessageBox.Show("Please enter numeric value.") End If End If End Sub Private Sub …

Member Avatar for ShahanDev
0
99
Member Avatar for discovery-power

You can follow this link: (it is for MSAccess, but will let you know how to do that) Instead of OLEDB Classes you can use SqlClient's Classes like: SqlConnection SqlCommand SqlDataREader etc..... [URL="http://www.codeproject.com/KB/vb/InsertUpdateDeleteSearch.aspx"]http://www.codeproject.com/KB/vb/InsertUpdateDeleteSearch.aspx[/URL]

Member Avatar for discovery-power
0
112
Member Avatar for WDrago

Hi! My guess for writing this line differently: dateString(s.Length - 1) = New String is that anything which is a [B]ValueType [/B]assigns a default value.See this: [URL="http://msdn.microsoft.com/en-us/library/aa904377%28v=vs.71%29.aspx"]http://msdn.microsoft.com/en-us/library/aa904377%28v=vs.71%29.aspx[/URL] Cheers!!!

Member Avatar for WDrago
0
177
Member Avatar for abhishekjec

Can you please elaborate more ??? The things I understood from your question now is that: You have a database, named "datacs" which have a table "Student" that have following attributes: name->name of student sem->Semister rollno->student roll no pho1-> ????? Please explain: >>>>roll no i have entered now i have …

Member Avatar for ShahanDev
-1
83
Member Avatar for tendaimare

Hi! Add a CLASS in your project, name it "DataAccess". Add this line at start of the class just created: [CODE]Imports System.Data.SqlClient[/CODE] Paste the code block you have in the second attachement. Then only this line may cause an error: HandleConnection(cnInsert) It should be a method in the same class …

Member Avatar for ShahanDev
0
84
Member Avatar for afaque01

Hi! I found some problems in your code i.e., declare variable(s) with appropriate type and consider conversion where necessary Your line 13 should be: [CODE]Dim child as Double = CDbl(l8.Text) / 2[/CODE] and Line 15: [CODE]child2 = child * CDbl(Cb3.Text)[/CODE] Similarly line 17 - 20: [CODE] Dim adult As Double …

Member Avatar for afaque01
0
172
Member Avatar for sganandhsg

Can you post your code what you have now for managing username collection ?? So that we can move further.

Member Avatar for ShahanDev
0
79
Member Avatar for tendaimare

Hi! Try this: [CODE] If txtSQL.Text = "" Then txtSQL.Text = chlTableCols.GetItemText(chlTableCols.SelectedItem.ToString) Else If Not (txtSQL.Text.Contains(chlTableCols.SelectedItem.ToString)) Then txtSQL.Text = txtSQL.Text & "," & chlTableCols.GetItemText(chlTableCols.SelectedItem) Else txtSQL.Text = "," & txtSQL.Text txtSQL.Text = txtSQL.Text.Replace("," & chlTableCols.GetItemText(chlTableCols.SelectedItem), "") txtSQL.Text = txtSQL.Text.TrimStart(",") End If End If[/CODE]

Member Avatar for tendaimare
0
148
Member Avatar for Saikumar Adep

One possibility is that you can query on DataSets' Table using LINQ. I will provide you example if required.

Member Avatar for ShahanDev
0
99
Member Avatar for steven8579

Hi! I made this sample, which saves the combobox item when application terminates and load and select the combobox last saved item when application starts: [CODE] private void Form1_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) { System.IO.StreamWriter wr = new System.IO.StreamWriter("C:\\abc.txt"); wr.WriteLine(ComboBox1.Text); wr.Close(); } private void Form1_Load(System.Object sender, System.EventArgs e) { if ((System.IO.File.Exists("C:\\abc.txt") …

Member Avatar for steven8579
0
1K
Member Avatar for sampaw20

Hi! Your update should be done like this: [CODE]//==========To Update con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Records.mdb;Persist Security Info=True;Jet OLEDB:Database Password=registerme" con.Open() constr = "Update TableName SET ColumnToSet=" & AnyValue & "YourPrimaryKey=" & anyValue" cmd =New OleDb.OleDbCommand(constr,con) cmd.ExecuteNonQuery() //===============To re-bind after Update constr = "select * from Sections" da = New OleDb.OleDbDataAdapter(constr, con) …

Member Avatar for ShahanDev
0
181
Member Avatar for Munnazz

Hi! Does it help you ?? [url]http://jimmyzblog.com/asp-net/administrator/custom-validation-summary-server-control-with-custom-errors/[/url]

Member Avatar for ShahanDev
0
83
Member Avatar for discovery-power

Hi! >>>>I imagine I need to place this code in the form load event It depends on your need when you want your combobox to fill. So, use appropriate event for that. Here is a Form_Load event sample code in a link that might help you: [URL="http://social.msdn.microsoft.com/Forums/en/Vsexpressvb/thread/8844df20-9c56-47b5-8023-3d5b38d454d2"]http://social.msdn.microsoft.com/Forums/en/Vsexpressvb/thread/8844df20-9c56-47b5-8023-3d5b38d454d2[/URL] Also these two …

Member Avatar for discovery-power
0
117
Member Avatar for steven8579

You can change this: [code] foreach (ListItem ls in ListBox1.Items) { bnr.Write(ls.Text); } [/code] With this as well: [code] foreach (object ls in ListBox1.Items) { bnr.Write(ls.ToString()); } [/code]

Member Avatar for steven8579
1
171
Member Avatar for katmai539

Hi! This might help you: Follow this link: [URL="http://www.codeproject.com/KB/recipes/hexencoding.aspx"]http://www.codeproject.com/KB/recipes/hexencoding.aspx[/URL] OR this is the code for your help to give you a start: [CODE] int number = 4; string str = Convert.ToString(number, 2); //Convert 4 in binary [/CODE]

Member Avatar for ShahanDev
0
164
Member Avatar for Mike Bishop

Try this: After line 18 of your code provided to us, write these LOC: Dim bmp as System.Drawing.Bitmap = new System.Drawing.Bitmap(PictureBox1.Image) bmp.Save("FILENAME.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

Member Avatar for Mike Bishop
0
205
Member Avatar for like_bilal02

Can you show your table structure ??? like: [B]Field Datatype[/B] vr_no int . . . . . . etc... because my guess is that you are getting "Nothing" in "mydataa" and to check this, first i need to know the structure of table to help you.

Member Avatar for ShahanDev
0
136
Member Avatar for like_bilal02
Member Avatar for stevanity

Hi! I will prefer VB.Net, the reason is that it provide some functionality which i found preferable to me. 1) When I created a button both in C# and VB.Net and double clicked on it, at code behind btn_Click code generated. But when I decided to remove that code: In …

Member Avatar for UsSy
-1
213
Member Avatar for nilofer

Please try these links: [URL="http://www.java2s.com/Tutorial/CSharp/0080__Statement/Nestedforlooptocalculateprimenumber.htm"]http://www.java2s.com/Tutorial/CSharp/0080__Statement/Nestedforlooptocalculateprimenumber.htm[/URL] [URL="http://www.daniweb.com/forums/thread80255.html"]http://www.daniweb.com/forums/thread80255.html[/URL]

Member Avatar for ShahanDev
0
80
Member Avatar for udigold1

Hi, Try like this: [CODE] OleDbConnection con=new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Shahan.COREI3\My Documents\DateRange.mdb"); OleDbCommand command = new OleDbCommand("select * from tbl1_order where StartDate between #" + dateTimePicker1.Value.ToString().Split(' ')[0] + "# and #" + dateTimePicker2.Value.ToString().Split(' ')[0] + "#"); con.Open(); command.Connection = con; OleDbDataAdapter da=new OleDbDataAdapter(command); DataSet ds=new DataSet("Dset"); da.Fill(ds); dataGridView1.DataSource =ds.Tables[0]; con.Close(); …

Member Avatar for udigold1
0
253

The End.