Add New Fields to a Recordset
I have been put in charge of modifying an existing portal, yet I cannot seem to figure out the SQL statements used to create the recordset. It's not your standard SQL statement in which you can see what tables the information is being pulled from. He's using one line in order to activate a SQL statement that is several lines of code. I've never seen or used this before, but I can understand why it is more efficient on the client side. I've have found the statement in the SQL Server database, but I still cannot find the actual SQL statement broken down. I've tried just adding the new records where they need to be, but I keep getting the message that these fields are not included in the recordset. I would appreciate any help. I'm running out or time and sanity.
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application(XXXXX_ConnectionString")
Set RecordsetName = Server.CreateObject("ADODB.Recordset")
if Session("XXXX") And tViewerGroup="XX" Then
sql = "sp_XXXXXXXXX " & tSessionUserID
else
sql = "sp_XXXXXXXXX " & tSessionUserID
End if
RecordsetName.CursorLocation = 3
RecordsetName.Open sql, Conn, 1
Set RecordsetName = RecordsetName.NextRecordset
Conn.Open Application(XXXXX_ConnectionString")
Set RecordsetName = Server.CreateObject("ADODB.Recordset")
if Session("XXXX") And tViewerGroup="XX" Then
sql = "sp_XXXXXXXXX " & tSessionUserID
else
sql = "sp_XXXXXXXXX " & tSessionUserID
End if
RecordsetName.CursorLocation = 3
RecordsetName.Open sql, Conn, 1
Set RecordsetName = RecordsetName.NextRecordset
Here is the code that is opening up the connection and you can see the sql line that is referring to the entire sql statement. I'm used to seeing the entire recordset so that I can pull fields from it, but I just can't seem to find the SQL statement. I've searched the entire database for clues, but I am having no luck. All I want to do is add four new fields to this recordset, so that I can start populating those fields with information. I'm an Access user who is trying to learn SQL Server, but I'm not having too much luck. All of the dependencies and stored procedures are throwing me for a loop. I would appreciate any help.
Comments
It Looks Like
You must me logged in to write a comment.