Questo è il codice del form mi date una mano?
Come faccio a popolare delle textbox con i record del datagrid e sopratutto come aggiorno il datagrid con gli stessi?
tnx!!!
Option Explicit
Private Const RemotePath = "http://localhost/mailing/xmlado/"
Private Sub Command1_Click()
Dim stm As ADODB.Stream
Dim xml As MSXML.XMLHTTPRequest
Set xml = New MSXML.XMLHTTPRequest
Set stm = New ADODB.Stream
rs.Save stm, adPersistXML
xml.Open "POST", RemotePath & "Update.asp", False
xml.send stm.ReadText
If xml.responseText <> "" Then MsgBox Right(xml.responseText, Len(xml.responseText) - InStr(xml.responseText, vbCrLf) - 1), vbCritical, Left(xml.responseText, InStr(xml.responseText, vbCrLf) - 1)
End Sub
Private Sub Form_Load()
Call mnuconnetti_Click
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call mnuchiudi_Click
End Sub
Private Sub mnuchiudi_Click()
Dim frm As Form
For Each frm In Forms
Unload frm
Next
End Sub
Private Sub mnuconnetti_Click()
Set rs = New ADODB.Recordset
With rs
If .State = adStateOpen Then .Close
.CursorLocation = adUseClient
.Open RemotePath & "query.asp?TableName=clienti"
End With
If rs.Fields(0).Name = "Type" And rs.Fields(0).Value = "##Error##" Then
MsgBox rs("Description") & vbCrLf & "Codice: " & rs("Code"), vbCritical, rs("Source")
Else
Set DataGrid1.DataSource = rs
End If
End Sub

Rispondi quotando