I am trying to customize a Microsoft Outlook Form. It uses VBScript to handle the customization. I am trying to ADO to connect to a SQL Server Database. I am connecting fine the problem is with the RecordSet. My Code is as follows:
Set conn = Item.Application.CreateObject("ADODB.Connection"
Set rs = Item.Application.CreateObject("ADODB.Recordset"
conn.open "Connection String; User ID; Password"
Query = "Select * From TableName"
Set rs = conn.Execute(query)
The code is generating a error on the last line.
The error states that the Tablename is an invalid object.
What am I missing?
Set conn = Item.Application.CreateObject("ADODB.Connection"
Set rs = Item.Application.CreateObject("ADODB.Recordset"
conn.open "Connection String; User ID; Password"
Query = "Select * From TableName"
Set rs = conn.Execute(query)
The code is generating a error on the last line.
The error states that the Tablename is an invalid object.
What am I missing?