Hye, can one please explain to me about the code below. I need to know what exactly should be inside Field1 and Field2? I'm new to vb.net. I know that tbltemp should be the name of our table but im confused about the Field1 and Field2.

Dim strSQL as String
strSQL = "SELECT Field1, Field2 FROM tbltemp WHERE Field1 = '" & TextBox1.Text & "'"

Is this line of code correct? I'm just trying..

sqlCmd = New SqlCommand _
                ("SELECT FormulaCode, BatchAbsNo, FormulaName, BatchStartTime, BatchFinishTime FROM dboBatchReportHeader WHERE FormulaCode = '" & TextBoxIngCode.Text & "'")

field1 and field2 should be the name of the columns in your table

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.