467 Posted Topics
Re: Referrencing from [your post](https://www.daniweb.com/software-development/vbnet/threads/490835/calculation-in-listview) Do the same as you did in that post. Private Sub clickMe(sendr As Object, ByVal e As EventArgs) Dim btn As Button = CType(sendr, Button) Dim ProdMatch As Boolean = False For i As Integer = 0 To lvorder.Items.Count() - 1 If lvorder.Items(i).SubItems(1).Text = btn.Text Then … | |
Re: At Line No. 7 the declaration of command object would be Dim cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand(sql, con) And your SQL Statement would be sql = "insert into tblorder (code,items,total) values ('" _ & lblcode.Text & "','" _ & x.subitems(1).Text & "','" _ & lbltotal.Text & "')" Use parameterised … | |
Re: Please, post the codes you wrote first and then describe your problem. Forum members are here to help you. | |
Re: Agreed with hericles, Use parameterised query to prevent mallicious attack to your database. Your codification if to some correct, only needed simple modification. Exchange the place between Line No. 1 & 2. Mysqlconn = New MySqlConnection Mysqlconn.ConnectionString = "server=db4free.net;Port=3306; user id=****; password=d****; database=****g" If do I correct, **UserName** and **Password** … | |
Re: What I think that you need an another column for rate. In your memo, you must inclde a column for rate of a single unit. The columns should be **Qty-------Name of Dish-----------Rate------------Price** So everytime, when you have tried to insert/increase a Qty of a product multiply QTY with rate to … | |
Re: To get month name you can use **MonthName(Date.Now.Month)** function, which can convert integer values 1 to 12 to their corresponding month name. | |
Re: Agreed with Reverend Jim. Use Question Mark i.e. **?** as a placeholder of a Parameter. Your SQL Statement shoud be Dim sql As String = "INSERT INTO tbldailysales(date, totalprice) VALUES(?, ?)" But, what was the error report. Is your connection Object Opened. I did not find it in your code. | |
Re: To move items from one to another is simple. After moving the item you can remove from the listbox items list by its selectedIndex value. If Not ListBox1.SelectedItem = Nothing Then ListBox2.Items.Add(ListBox1.SelectedItem) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) End If Hope it can help you | |
Re: Agreed with @ddanbe, Everything could be done in a for loop at Form Load() event. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To 6 DataGridView1.Rows.Add() If i > 0 Then DataGridView1.Rows(i).Cells(0).Value = (i + 1) + Val(DataGridView1.Rows(i - 1).Cells(0).Value) Else DataGridView1.Rows(i).Cells(0).Value … | |
Re: Yes, Mr. Ray, Please post how far you did and what problems you are facing to run your application. Everytime we are with you to help to overcome your problems. > i can use VB through VS2013 for front end and for Backgroung MS Access Database. No hasitation, 1) Design … | |
Re: As per your codification **textbox2** is not for numbers. It would be **TextBox1**. > i need that to happen not every time i enter, but when it has only 9 and the person is trying to enter only 9. Is it for the text length? If it, the codes should … | |
Re: Downlod Sap Crystal Report for Microsoft Visual Studio and instal it. | |
Re: To get proper help post your codes, how far have you done and also the error you have faced at run time. And also make a distinct question on that matter. Ok! **1st Option :** Take a TextBox, set Visible = False. Top & Left are same as the Label … | |
Re: Your codification is quite right, except SQL Statement. It should be Dim sql As String = "UPDATE tbluser SET " & _ "name =?" & _ "pos =?" & _ "address =?" & _ "contact =?" & _ "username =?" & _ "WHERE ID =?" Here is a [tutorial](https://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks), please … | |
Re: Reverend Jim is correct. Use Panel Control to Hold the Buttons instead of ListBox and set AutoScroll Property to True of the Panel Control. Make sure in which direction you want to arrange them, Horizontaly/Verticaly and calculate the control's position. | |
Re: Inspite of **MonthCalendar1_DateSelected()** event handler use ** MonthCalendar1_DateChanged()** event handler. | |
Re: @Xiao_1: Don't make duplicate post or same post several times. You already create [another post on same topics](https://www.daniweb.com/software-development/vbnet/threads/490742/why-could-not-move-to-other-listbox). | |
Re: Bad choice! This is not the appropriate forum for your homework. Here is many to help you, but no one to do your homework. | |
Re: Search in net. There are too many Decompiler Software. You can retrive your source codes from your applications .exe file using any of them. But, I am not sure how much fruitful it might be. I never tried it. | |
Re: ListBox is not the appropriate for this purpose. Anyone of Listview or DataGridView is best to show the receipt items. | |
Re: If you try to hold the number, how many times you clicked a button, then Reverend Jim's technic is the perfect one. But, if you want to show the numbers as an item in a listview like a serial no, simply add the **ListView.Items.Count() + 1** as a item of … | |
Re: Make two nested loops, 1st loop to go through Array1 and 2nd loop to go through Array2 for comparing. For i as Integer = 0 to Array1.GetUpperBound(0) Dim comp As Boolean = False For j as integer = 0 to Array2.GetUpperBound(0) If Array2(j)=Array1(i) Then comp = True Exit For End … | |
Re: Agreed with @pritaeas, *Dim ImageData As Byte() = DirectCast(cmd.ExecuteScalar(), Byte())* never returns any data from database. You must have to read the field value of the database through MySqlDataReader() Class and then it can show the image from MemoryStream. Hope it can give a way to do your job. | |
Re: > Unable to cast object of type 'ListViewSubItem' to type 'System.IConvertible] An object never convert to Decimal type. The codes should be Dim qty = Convert.ToDecimal(lvorders.FocusedItem.SubItems(0).Text) Dim price = Convert.ToDecimal(lvorders.FocusedItem.SubItems(2).Text) Dim name = lvorders.FocusedItem.SubItems(1).Text.ToString() Then do the same as Reverend Jim describes. | |
It doesn't display my latest Avatar. I uploded it aproximately 8:00 pm, but now nearly 10::00 pm. Not Updated in two hours. | |
Re: The codes are quite right. Why do you write the codelines 10 & 11 after complition of the loop. It could save the last row of your listview control. To save every rows from listview control write them into the loop. The codes should be For Each x As ListViewItem … | |
Re: No one has an "Aladin's Light". Post your code, how far you go and the exceptions you are facing. Describe your problems, everyone hear to help you to solve your problems. | |
![]() | Re: > 'Syntax error (missing operator) in query expression '[StudentID]='. From my assumption after seeing the exception **StudentID** is a Text Type field. So from my opinion write the SQL Statement as you did previously. i.e. "SELECT * FROM Subjects WHERE [StudentID]= '" & StudentID.Text & "'" Get sure that the … ![]() |
Re: Codes are quite right. But, you didn't mention the **AdminNo** in select Statement to get as output result, so how could you get it from **sqlReader**. Already you have the AdminNo incbbproject combobox. Take it from there. If sqlReader.HasRows Then sqlReader.Read() txtpn.Text = (sqlReader.Item("ProNm").ToString) ListBoxassign.Items.Add(cbbproject.Items(cbbproject.SelectedIndex)) End If Hope it can … | |
Re: You can do it easily if you create the corresponding Table Buttons Dynamically and show on the form. The codes should be Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim CMD As OleDB.OleDbCommand = New OleDb.OleDbCommand("Select * from tbltable1",con) con.Open() Dim rd As OldDbDataReader = CMD.ExecuteReader() If … | |
![]() | Re: The codeblocks never returns any value. After `Closing` a form how could you think that the next codelins would be executed. You have already closed the LogIn form by calling `Me.Close()`. After execution of this line nothing could be executed. Your codes are quite right but some modification are needed. … ![]() |
Re: Remember, to get ans. you will have to describe your probs. and the exception what are you facing. No one here to do the ans. finding qus./excp. from your post. Please make your post more distinct. From my opinion, 1) an exception can occur from the contruction of your [connection … | |
I have a curiosity about the “Title” of a member. Though, I do not worry about it, but I have a question on this matter. Why “Title” is assigned/updated by a member, not by forum as per their performance? | |
Re: No need to use **Format()** function because SQl doesn't understand it and also the single quatation marks. Only for String Type value you can use the Single Quatation Marks . The SQL Statement statement would be sql = "select * from ministmnt where (dat between " & DTPicker2.Value & " … | |
Re: In vb it is the syntax to write the DateTime value you must be prefixed and sufixed the value by Hash Character i.e. #. **Dim CurDateTime As Date CurDateTime = #1/16/2015 9:15:30 AM#** | |
Re: Post your codes first, then describe your problem and what do you desire. Too many exparts are here, obviously they help you to ovecome your problem. | |
Re: The statement was quite right. Only between clause may be coverded by parenthesis. The statement would be Dim da As New OleDbDataAdapter("SELECT * from EncodingComplete where (Date_Bill BETWEEN @startDate AND @endDate) AND Client like @client Order by Date_Bill desc" , con) From my opinion, the exception arises form prarmeter declaration … | |
Re: You can redimention the last element to change the size of the dynamic array. For one-dimention array ReDim Preserve DynamicArray(DynArray.GetUpperBound(0) + 1) For Two-dimention array ReDim Preserve DynamicArray(4, DynArray.GetUpperBound(1) + 1) For Three-dimention array ReDim Preserve DynamicArray(2, 4, DynArray.GetUpperBound(2) + 1) **GetUpperBound(2)** rerurns the upperbound of the array element. **GetLowerBound(0)** … | |
Re: In VB6 Package And Deplyment Wizard, there is no option to assign the product key value. I think you should have to make your own set up wizard. It is possible. Try it. | |
Re: In Package and Deployment Wizard you can attach every type of files you need and you can set their installation location. [Distributing Your Application](http://msdn.microsoft.com/en-us/library/aa716256(v=vs.60).aspx) | |
Re: Do not understand which codeblocks you used to show your result in datagridview Block1 or Block2 Or both simultaneously. If you use both codeblocks simultaneously in a Button_Click event, **Blank** is the currect result. To get result use any one of the codeblocks with proper Sql Statement. CodeBlocks1 : Firstly, … | |
Re: Till now cursor jumps between "Home" and "End" position of a line, When I am tring to set the cursor position by clicking mouse in a line. | |
Re: Store your date data in an encrypted file. At the time when application starts decrypt the file and pick up the date value and check it. | |
Re: > I want to continue and begin at line 8 and do the following: To throw the blank lines you can use the condition If (textRowNo >= 8) And (Trim(LineFromFile) <> "") Then arrival = Mid(LineFromFile, 1, 9) status = Trim(Mid(LineFromFile, 11, 3)) '... End If | |
Re: **SqlDatabaseClient(int Id, MySqlConnection Connection)** this is not a process to assign a open Connection object to a newly declared Connection Object. And the exception arises from here. Only pass the ConnectionString . The codes should be public SqlDatabaseClient(int Id, ConnStr as String) { mId = Id; mConnection.ConnectionString = ConnStr; mConnection.Open() … | |
Today's afternoon, I made an answare to the post **phone number** in vb.net forum. Now this is 8:18PM it is vanished. | |
Today, I get an mail from DW, though I get some mails everyday normally. But it attaracts me and raises my curiosity, for it's title "**You've Earned Rewards Points** and I can cashout it as per a line in my mail > Rewards points can be cashed out for real … | |
Re: My point of view, your problem is in your connection string. A semicolon ";" should be needed after **.....\h.mdb"** that is like **.....\h.mdb;"**. Andalso remove the lines > cmd = new OleDbCommand(); > cmd.CommandType = CommandType.Text; | |
Re: @CodingSource: **DataBindings** is a Readonly property of DataGridView object, used to get the databindings of the object. So, remove the line 8. And also there is a need to modify your SQl Statement. It should be "SELECT * From EncodingComplete where Date_Bill Between " & DateTimePicker1.Value & " And " … |
The End.