Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Sybase Tables via Visual Basic 1

Status
Not open for further replies.

RangerFan

MIS
May 4, 2000
61
US
We would like to update Sybase tables contained on a
standalone pc via use of a SQL statement executed from a
Visual Basic application.

Can anyone help in telling up how to connect to the tables
via ADO? Also what else would be needed to accomplish this
task? After making the connection, would it be like updating an Access table?

Any help would be appreciated.
 
Here is some sample code, hope this helps you

Open new connection
//////////
Dim objConn As New ADODB.Connection
Dim objComm As New ADODB.Command
Dim objRec As New ADODB.Recordset
objConn.ConnectionString = "DSN=*;UID=*;SERVER=*;PWD=*"
objConn.Open

Update
////////
objComm.ActiveConnection = objConn
objComm.CommandText = "Update table blah blah.. "
objComm.CommandType = adCmdText
objComm.Execute
objConn.Close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top