Proyecto Mysql y Vb6.0
Frecuentes
Visto 817 veces
0
Private Sub cmdAdd_Click()
Dim rs As ADODB.Recordset
Dim strsql As String
strsql = "insert into Issue_Tab(Startno, End no, Issuedate, Brncode) Values( ' " & txtstartno.Text & " ' , ' " &
txtendo.Text & " ' , ' " & txtdate.Text & " ' , where Brncode = ' " & txtbrncode.Text & " ' ) "
Set rs = pcnl.Execute(strsql)
Set rs = Nothing
MsgBox " Saved"
Me.filllistview
End Sub
Sub filllistview()
strsql = "select * from Issue_Tab"
Set rs = pcnl.Execute(strsql)
ListView1.ListItems.Clear
Do While Not rs.EOF
Set Item = ListView1.ListItems.Add(, , rs!Startno)
Item.SubItems(1) = rs!Endno & ""
Item.SubItems(2) = rs!Issuedate & ""
Item.SubItems(3) = rs!Brncode & ""
rs.MoveNext
Loop
Set rs = Nothing
End Sub
Private Sub Command1_Click()
Dim strsql As String
Dim rs As ADODB.Recordset
strsql = " Delete from Issue_tab where Brncode = ' " & txtbrncode.Text & " ' "
Set rs = pcnl.Execute(strsql)
Set rs = Nothing
MsgBox "Delete"
Me.filllistview
End Sub
Private Sub Form_Load()
Me.filllistview
End Sub
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
With Item
txtstartno.Text = Item
txtendno.Text = .SubItems(1)
txtdate.Text = .SubItems(2)
txtbrncode.Text = .SubItems(3)
End With
End Sub
Private Sub txtupdate_Click()
Dim strsql As String
Dim rs As ADODB.Recordset
strsql = " update Issue_Tab set startno = ' " & txtstartno.Text & " ' , Endno = ' " & txtendno.Text & " ' , Issuedate = ' " & txtdate.Text & " ' where Brncode = ' " & txtbrncode.Text & " ' "
Set rs = pcnl.Execute(strsql)
Set rs = Nothing
MsgBox " Updated"
Me.filllistview
End Sub
"""" i did this coding in my project & i also did add the module in it.... but the problem with the coding is that neither it is showing any error nor it is working and not showing changes in database of my sql..... so please help me out as soon as you can coz i have to submit the project in the company.......
thanks in advance.. for helping me into this..!
1 Respuestas
0
I have a few questions to best expose your problem:
- First of all you should check mysql logs, and are they enabled?
- ¿Se está ejecutando mysql?
- How did you install your mysql? is it vanilla?
- Did you install MySQL plugin for ODBC?
- Is your console/dynamic log enabled on vb6? try some echoing in order to see what's happening.
Respondido 28 ago 12, 10:08
Dude i downloaded my sql server 5.5 simulatneuosly and also downloaded the odbc connector 3.51....... so plz exlain this !!! Yesterday i used Adodc except of adodb connection.... But having the problem in running the add coding its showing error on date datatype so exlain this y it is showing error!! - user1629521
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas mysql vb6 or haz tu propia pregunta.
@Spudley, irrelevant, people are free to program/use any language they feel like, stackoverflow is meant for all languages... - Jake Armstrong
@Spudley at least people dont need to download the whole .net framework to run your program then what is a pain in the arse - EaterOfCode