DataBase


Connect to a database. add data to a mysql table


Public Sub Form_Load()

  On Error Resume Next
  Dim driver As Class 
  driver = Class.forName("com.mysql.jdbc.Driver")
  If driver = Nothing Then MsgBox "Not found!"
   On Error Goto 0
   
  Call Database1.Connect("jdbc:mysql://localhost/arquitectura", "root", "")


End Sub

Public Sub Command1_Click()


 Database1.Execute ("INSERT INTO material (`material`,`descripcion`,`cantidad`,`precio`,`total`) 

values ('" & Me.Text1.Text & "','" & Me.Text2.Text & "','" & Me.Text3.Text & "','" & Me.Text4.Text & "','" & Me.Text5.Text & "')")

End Sub

Retrieved from "http://www.jabaco.org/wiki/DataBase"

This page has been accessed 3,285 times. This page was last modified on 15 August 2013, at 19:31.


This page has been accessed 3,285 times. This page was last modified on 15 August 2013, at 19:31.