Microsoft Visual Studio 2008 Service Pack 1
.NET, Ejemplos - Código fuente Comentarios ( 4 ) »La descarga es el archivo ISO de Visual Studio 2008 SP1.
Por: David Amador T
Dim
connstr As
String
= "provider=VFPOLEDB.1;"_
"data source='c:Archivos de
programa"_
"Microsoft Visual FoxPro 7SamplesTastrade"_
"Data astrade.dbc';password='';user
id=''"
Dim
conn As
New
System.Data.OleDb.OleDbConnection
conn.ConnectionString =
connstr
Dim
cmd As
New
System.Data.OleDb.OleDbCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = "UPDATE customer SET company_name
= ?,"_
" contact_name = ?, contact_title = ?
"_
" WHERE customer_id = [ALFKI]"
cmd.Connection = conn
Dim
p1 As
New
System.Data.OleDb.OleDbParameter
p1.Value = "VFP"
cmd.Parameters.Add(p1)
Dim
p2 As
New
System.Data.OleDb.OleDbParameter
p2.Value = "OLEDB"
cmd.Parameters.Add(p2)
Dim tally As Integer
Try
conn.Open()
tally = cmd.ExecuteNonQuery()
conn.Close()
Catch
ex As
Exception
Debug.Write(ex.Message)
End
Try
MsgBox(tally)