Jump to content
Sign in to follow this  
zaki9030

Mcm Mane Nak Masukkan Data Kat Database Acces Gune Radio Button Dalam

Recommended Posts

ASP.NET. Assalamualaikum. saya ade try buat tapi cume boleh masukkan gune textbox je. nak gune radio button tataw nak wat camne
ni contoh coding yang saye da wat


Imports System.Data
Imports System.Data.OleDb

Partial Public Class purchase
Inherits System.Web.UI.Page

Protected Sub btnsubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnsubmit.Click
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
& Server.MapPath("Web2.mdb") & ";"
Dim MySQL As String = "INSERT INTO Pengguna1 " & _
"(Nama, Address, Tel_No, Email) VALUES " & _
"('" & txtnama.Text & "','" & txtaddress.Text & "','" & txttel.Text & "','" & txtemel.Text & "')"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(MySQL, MyConn)
MyConn.Open()
cmd.ExecuteNonQuery()
MyConn.Close()
Response.Redirect("guest.aspx")
End Sub

sape2 yang tau plss tolong.. Edited by zaki9030

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...