I need some help...
i am the beginner vb.net developer,
so i need someone correct my coading to insert data from text field into database mssql...
below is my coading;


Protected Sub btnSimpan_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSimpan.Click

Dim dtTemp As New DataSet
Dim ddClass As New clsData
Dim value1 As String
value1 = "'" & "nameSyarikat" & "'"

Dim strSQLInsert As String = "Insert into ts_maklumat_syarikat (nama_syarikat) values (" & value1 & ")"

dtTemp = ddClass.PopulateData(strSQLInsert, ConfigurationManager.AppSettings("strConnection"), "LISTDOC")


End Sub

TQ

So what is wrong, is it not inserting the row.

I presume clsData is a class you have defined. you need to supply the code to that.

still cannot insert into database from textfield..
can anybody correct my coading...

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.