Proyecto Mysql y Vb6.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..!

preguntado el 28 de agosto de 12 a las 08:08

@Spudley, irrelevant, people are free to program/use any language they feel like, stackoverflow is meant for all languages... -

@Spudley at least people dont need to download the whole .net framework to run your program then what is a pain in the arse -

1 Respuestas

I have a few questions to best expose your problem:

  1. First of all you should check mysql logs, and are they enabled?
  2. ¿Se está ejecutando mysql?
  3. How did you install your mysql? is it vanilla?
  4. Did you install MySQL plugin for ODBC?
  5. 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 or haz tu propia pregunta.