Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

insert query for insert all data into table in vb6 but it insert 1 row in table

New Here ,
Sep 21, 2010 Sep 21, 2010

This is My insert query in vb6 but it insert 1 row in table

But i want insert all data in the table which contain the id =1.

Note that billtabsuport is blank

i want solution for this

strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption

Set DBrecordset = DBConnection.Execute(strSQL)

strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"

DBConnection.Execute (strSQL)

TOPICS
Database access
732
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2010 Sep 21, 2010
LATEST

The syntax for inserting from one set of tables to a new table is:

insert into newtable

(field1, field2, etc)

select somefield1, somefield2, etc

from some other tables

where whatever

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources