agent0047
Programmer
- Jan 11, 2008
- 15
The code below is the path we use on the sql server but here is the thing I am trying to figure out how to code this in a ms word doc so that when I open the word doc it will populate the document when it opens with name, address... based on the above criteria?
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=SQLNCLI;Server=SERVER\SQLEXPRESS;Database=GE_Data;Trusted_Connection=yes;"
Conn.Open
sql = "SELECT * FROM [DB] WHERE [DB].[DBID]=" & session("dbid")
rs.open sql, conn, 3, 3
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=SQLNCLI;Server=SERVER\SQLEXPRESS;Database=GE_Data;Trusted_Connection=yes;"
Conn.Open
sql = "SELECT * FROM [DB] WHERE [DB].[DBID]=" & session("dbid")
rs.open sql, conn, 3, 3