SQL server Insert help needed

lpaul

Active member
Joined
Dec 7, 2005
Messages
27
Programming Experience
Beginner
:eek: How do convert this to vb.net using ADO.net - it is inserting values into an SQL table? What Imports namespaces and how do I format and connect to the server and will I still use the same Insert Into statements??

ADOCn.Open("0567_SQL_750_REPORTS", "sa", "sa")
ADOCmd.ActiveConnection = ADOCn
Set ADORs.ActiveConnection = ADOCn

ConStr = "INSERT INTO Reports (rptnum1, rptnum2, rptpages, rptcost) VALUES ('"
ConStr = "INSERT INTO Reports (rptnum1, rptnum2, rptpages, rptcost) VALUES ('"
ADOCmd.CommandText = ConStr
 
well, for starters, you need the rest of your insert statement.
Also, if you look in my signature, you'll find two ADO.NET tutorials that may be of some use.

-tg
 
Back
Top