Monday

vba code : access sql server from outlook



'Access SQL server from oputlook
Sub AccessSQLServer(Item As Outlook.MailItem)
Set con = CreateObject("ADODB.Connection")
con.Open "driver={SQL Server};Uid=sa;server=myserv;pwd=mypass;database=mydb;"
Set rs = CreateObject("ADODB.Recordset")
rs.ActiveConnection = con
rs.Open "SELECT * FROM MyTable"
Do While Not rs.EOF
MsgBox rs("id")
rs.MoveNext
Loop
End Sub


more...

No comments:

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...