467 Posted Topics
After opening DW, I started to read the postings in Activity Stream List and when I clicked on a post, I saw that there are too much difference between the brief in Activity Stream list and in discussion details. There are two posting posted by the member. No.1 is to … | |
Re: > Dim sql As String = "Select A.StaffNo,A.TimeIn,A.TimeOut, B.ProjectNo, C.AdminNo, C.UserName From tbl_lecturer A, tbl_assignment B, tbl_info C,= '" & TextBoxname.Text & "', '" & Textin.Text & "','" & Textout.Text & "'" Do not understand the SQL Statement. What do you want? | |
Re: Prepare a string value by concatinating through datagridviewRows. Like Dim x As String = "(" For Each r As DataGridViewRow In DataGridView1.Rows x &= r.Cells(0).Value If r.Index < DataGridView1.Rows.Count - 1 Then x &= ", " Else x &= ")" End If Next Now make the Sql Statement as hericles … | |
Re: You can did it by a for loop like For Each r As DataGridViewRow In DataGridView1.SelectedRows ' Process your Data Next | |
Re: You can create a command object with multiple SQL Statement. Like Dim CMD As New System.Data.OleDb.OleDbCommand CMD.CommandText = "Select * From Table1; Select * From Table2" And you can work with every select statement one by one. | |
Re: Did you check & confirm that the value of the matching feild of that particular row differ from the condition value in where clause? What do you mean by ? > where I can randomly update any two cell of a row You can update any number of valid fields … | |
Re: Do it in ComboBox_SelectionChanged Event. If you select an Item from ComboBox1 DropDown List Then `ComboBox2.Enabled = False` | |
Re: Why there are two **Where** clauses? Put an **And** between them in leu of second **Where**. | |
Re: > New System.Data.OleDb.OleDbParameter("DateTime", This is the cause for your exception. Write Parameters properly. You can use the datatype as **OleDb.OleDbType.DBTimeStamp**. And also you can declare the parameters more consizely. Like .Parameters.Add("@S", System.Data.OleDb.OleDbType.VarChar, 255).Value = Me.cmbN.Text .Parameters.Add("@T", System.Data.OleDb.OleDbType.VarChar, 255).Value = Me.cmbT.Text .Parameters.Add("@DateTime", System.Data.OleDb.OleDbType.DBTimeStamp).Value = Date.Now() | |
At today morning, when I open my profile, the value displayed at location position is "West Bengal". This is right, because I am from the state West Bengal, India. When I go to View Career Profile, at the bottom it shows my location as "Maharashtra, India". But, some days ago … ![]() | |
Re: In MySql databases reside in C:\ProgramData\MySql\Data folder if your OS is Windows 7 or Latter. From my point of view, make a BackUp File of your database and attache it at the time of creating a setup file(specify its destination folder). After loading your project Restore the database from the … | |
Re: It could be happen for many reason. Don't attempted to show logIn Form from other FormClass. Check and remove it if you do it from anywhere. Show the logIn form as Modal. If you try to show it modelessly your project shows the first form you attached in your project … | |
Re: It could be possible if you have an another "Price" Table. The SQL Statement would be like **UPDATE tblstoreitems SET tblstoreitems.price= SELECT tblitemprices.price FROM tblitemprices WHERE tblitemprices.TypeOrModel = tblstoreitems.TypeOrModel ORDER BY tblstoreitems.TypeOrModel;** Here **tblitemprices** is a table for price list with two fields. | |
Re: A password protected data base always need UserID and Password. Your problem is in ConnectionString. This is the connection string to use when you have an access database protected with a password using the Set Database Password function in Access. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb; Jet OLEDB:Database Password=yourdatabasepassword; hope it could help you. | |
Re: Hmmmmmmm! How far do you go? | |
Re: Download free e-books from internet about Windows Presentation Foundation. I suppose you can get it [here](http://www.it-ebooks.info/search/?q=WPF+in+vb.NET&type=title). | |
Re: Don't bounds the combobox to the dataset. by a loop read the table and add the value of the datafield to the combobox at the time of loading of the form. Then add a row->choose item from combobox and go through the other cells. No need to load data everytime … | |
Re: Here is a problem of scope of the variables. Like **boolFirst**, all boolean variables like **bool1, bool2,.......bool16** must declare at Formlevel. > If bool16 = True & boolFirst = True Then > ElseIf bool16 = False & boolFirst = True Then > If bool1 = True & boolFirst = True … | |
Re: > Dim sql As String = "Select [StaffNo] From tbl_lecturer " And "Select [ProjectNo] From tbl_assignment " And "Select [AdminNo] From tbl_info " This is not a valid SQL Statement. It should be Dim sql As String = "Select A.StaffNo, B.ProjectNo, C.AdminNo From tbl_lecturer A, tbl_assignment B, tbl_info C" And … | |
Re: Don’t insist any member to do any illegal work. | |
Re: Here you need an Alias for the column **Project Name** in your SQL Statement. A simple modification is needed. Dim conn As New System.Data.OleDb.OleDbConnection() conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\temp\Database1.accdb" If conn.State = ConnectionState.Open Then conn.Close() conn.Open() Dim sql As String = "Select [Project Name] ProNm From tbl_assignment Where ProjectNo ='" & … | |
Re: In your assign button Click event simple put the following lines 'Transfer item from ListBox1 To ListBox2 ListBox2.Items.Add(ListBox1.SelectedItem) 'Remove transferred item from ListBox1 ListBox1.Items.Remove(ListBox1.SelectedItem) And in unassign button change the names of the listboxes. | |
Re: > OrElse Not IsNumeric(people) OrElse Not String.IsNullOrWhiteSpace(people) Then It has no justification in the Function **ValidatePeople()**. You should did it before calling the function. Like If (not IsNumeric(txtpeople.Text)) or String.IsNullOr WhiteSpace(txtpeople.Text) Then MessageBox.Show("Please input a valid number withen 1 and 20.) Exit Sub End If people = ValidatePeople(Val(txtPeople.Text)) And your … | |
Re: How far you did? | |
Re: > better to use Projcet_Name or brackets "[Projcet Name]" Yes, This is right. If a Field Name contains one or multiple space, in Sql Statement cover it withen sqare brackets, like **[Projcet Name]**. If possible don't use space between two words to create a field. Always use underscore "_" in … | |
This conception I get from a post on CodeProject by [Heriberto Lugo](http://www.codeproject.com/Tips/837177/Recursion-for-Beginners-Sorting-Ten-Numbers-Withou). But that was for only 10 numbers. Then I had an idea to use it in vb. There are many shorting process like Bubble Short, Linear Short etc. But exceptionally it does not use loops as others do. … | |
Re: Your codes are quite right. Only a single mistake in line no 18. > VALUES ('@endereco_ip', '@posto_1_t_paragem_1', '@posto_2_t_paragem_2', '@posto_3_t_paragem_3', '@posto_4_t_paragem_4') No single quotation mark required before and after parameters. It should be VALUES (@endereco_ip, @posto_1_t_paragem_1, @posto_2_t_paragem_2, @posto_3_t_paragem_3, @posto_4_t_paragem_4) | |
Re: There is no "Show" keyword in SQL Statement to retrieve data from a table. Your SQL Statement swhould be Dim sql As String = "Select * From tbl_info" Now create a command object and dataReader object to read data from that table. | |
Re: uppose following should be help you [http://www.fmsinc.com/free/NewTips/SQL/SQLServerExpressDatabase/Automated_Bac](http://www.fmsinc.com/free/NewTips/SQL/SQLServerExpressDatabase/Automated_Bac) | |
Re: Your mistake is on line No 33. > intTime -1 This produces your error. it should be > intTime = intTime -1 | |
Re: Thinkless codification. I do here some modification. Your codes should be Try Dim sqlcmd As String = "SELECT Count(*) FROM tbl_datain WHERE Personl ='" & cbinfo.Items(cbinfo.SelectedIndex) & "' " & _ "And UserID ='" & txtname.Text & "' And PassWord ='" & txtpass.Text & "'" Dim sqlCom As New System.Data.OleDb.OleDbCommand(sqlcmd) … | |
Re: Wrong cods to construct SQL Statement. >For Each row As DataGridViewRow In dataGridView1.Rows >For i As Integer = 0 To dataGridView1.Rows.Count - 124 >objComm.CommandText = "SELECT * FROM table1 where Upazila = '" & dataGridView1.SelectedRows(i).Cells(2).Value.ToString() & "'" >Next >Next Do not understand, why did you use those nested loops. After … | |
Re: > the spreadsheet via a DataTable first? SpreadSheet -> DataTable -> DB2 It is possible to connect an excel through an OleDbConnectionString object and it works like a database and the sheet behaves like a table. | |
Re: There is a space required at the end of each lines. Your SQL Statement should be $query_four = "SELECT c.course_name, sc.st_classes_attempt, sc.st_classes_missed, st.stdnt_name "; $query_four.= "FROM `courses` AS `c` "; $query_four.= "INNER JOIN `student_attendance` AS `sc` "; $query_four.= "ON c.course_id = sc.c_id "; $query_four.= "INNER JOIN `students` AS `st` "; … ![]() | |
Re: Why are you declaring the variable "I" inside the loop. Every time the loop completes its round, a new variable "I" creates and initializes with the value 0. And all values are stored into the first element of the array "LMSarray". Declare the variable "I" outside the loop. Dim I … | |
Re: Wrong sytax. It should be LblTotalpayroll.Text = "Payroll Totals:" & vbNewLine & _ "Management:" & dbManagementPayroll.ToString & vbNewLine & _ "sale:" & dbSalePayroll.ToString & vbNewLine & _ "processing:" & dbprocessingpayroll.ToString & vbNewLine & _ "Phone:" & dbphonepayroll.ToString & vbNewLine | |
Re: **Syntax** -->*The grammatical rules and structural patterns governing the ordered use of appropriate words and symbols for issuing commands, writing code, etc., in a particular software application or programming language*. If you do not follow or write properly the above-mentioned grammatical rules and structural patterns, it causes for syntax error. … | |
Re: You tried to write it, but your direction of thinking is not in proper way. What did you try to do, was not in your mind. What were your jobs? *Declaring varibles*: You did it properly. Dim Num1 As String Dim Num2 As String Dim AorS As String Dim result … | |
Re: Load the picture first in a picturebox from file, then save it in your database. | |
Re: What do you mean by Setup file? Do you try to create your own setup file to load an another program to any computer? | |
Re: Do not understand your think and what did you want to do by these lines. >If rs.RecordCount >= 1 Then >dt_ProdReport.Rows(iProdCtr)("ASDCode") = rs("ASDCode").Value >dt_ProdReport.Rows(iProdCtr)("ASDName") = rs("ASDName").Value >dt_ProdReport.Rows(iProdCtr)("AMDCode") = rs("AMDCode").Value >dt_ProdReport.Rows(iProdCtr)("AMDName") = rs("AMDName").Value >Else >blnProdRep = True >'MsgBox("Looking to other table......", MsgBoxStyle.Information, "System Notification") >End If | |
Re: How could it work. You write a wrong syntax to assign the connection string. You must mention the name of the provider, through which you can open the database. Your codes should be 'Declaring Variables Dim db As New ADODB.Connection 'Database connection object Dim tbpro As New ADODB.Recordset 'Database recordset … | |
Re: Do works from brain. Copy Paste is most bad habit. Don’t copy everything without clearing conception. See, for what reason the commands are using and how. Following solutions from your [earlier post](https://www.daniweb.com/software-development/visual-basic-4-5-6/threads/487131/vb-how-to-create-new-user-can-storn-in-access-database), is acceptable and permissible. Blindly copy paste is most foolish work. If you have any question to clear … | |
Re: Use for loop through DGV's rows and a nested for loop through DGV's columns Every time add a new line after completion of nested loop for column. | |
Re: You can do it by a SQL Statement with a 'Where' Clause to match EmpID. Like Dim EmpComd as new OleDb.Data.OledbCommand EmpComd.CommandText = "Select * From LOgInTable Where EmpID='" & TxtEmpID.Text & "'" EmpComd.Connection = Conn Dim EmpDtRd as OleDbDataReader = EmpComd.ExecuteReader If EmpDtRd.HasRows then EmpDtRd.Read() '''''' 'Codes To Show … | |
Re: Create multiple tables like StudentInformation, DailyAttendance, MonthlyAttendance, YearlyAttendance. **Field Structures :** *StudentInformation :* StudID(Text)(Primary Key), StudName(Text), StudAddr(Text).........etc. *DailyAttendance* StudID(Text),AttdDate(Date) *MonthlyAttendance* StudID(Text),MonthName(Text),Year(Text),TotAttnd(Integer) *YearlyAttendance* StudID(Text),Year(Text),TotAttnd(Integer) Hope, itshould help you. | |
Re: You allready create and save a new user in your [earlier Posting](https://www.daniweb.com/software-development/visual-basic-4-5-6/threads/487131/vb-how-to-create-new-user-can-storn-in-access-database). Use that conception, only change the "Insert" Statement by "Select" Statement in SQL statement. To make confirmation whether the user is valid or not you can use it. Try If Conn.State = ConnectionState.Open Then Conn.Close() Conn.Open() Dim sql … | |
Re: Why are you insert an extra space in the filter condition **" year like '%{0}%' "**. before and after. | |
Re: **Container.Controls.Add(Control Value)**--->Adds the specified value to the control collection of the container. But there are no options to pass arguments for Left and Top position of that control to determine its position. `MyTblLayoutPanel.Add(label1,0,0);`---> should be performed an exception or pointed to an error about passing arguments i.e. **No overloaded for … | |
Re: From my point of view, TreeView and LIstView are most suitable for your job. You can use any one or both. |
The End.