05-10-2013, 03:41 AM
Its possible. given the Update access previlages to your DB.
i dont have sample code.
bt u can do this in similar way how you caonnect to the DB and query the DB
U can write a update query and execute it.
Thanks
Sonu
i dont have sample code.
bt u can do this in similar way how you caonnect to the DB and query the DB
U can write a update query and execute it.
Thanks
Sonu
Code:
Function db_connect( strSQL )
Set o_CON =CreateObject("ADODB.Command")
Set o_RS= CreateObject("ADODB.RecordSet")
serverName = Left(Environment.Value("LocalHostName"), 4)&"svr"'Inputbox("Enter the DB server Name")
If Trim( serverName) ="" Then
's_ConnectionString = "dsn=" & "yourDB"
serverName ="yourdbserver"
s_ConnectionString ="driver=sql server;server="& serverName &";database=yourDB;uid=yourdbuserid;pwd=yourpassword*"
Else
s_ConnectionString ="driver=sql server;server="& serverName &";database=yourDB;uid=yourdbuserid;pwd=yourpassword*"
End If
o_CON.ActiveConnection = s_ConnectionString
o_CON.CommandText= strSQL
Set o_RS =o_CON.Execute
Set db_connect = o_RS
End Function