Click here to Skip to main content
16,004,977 members
Home / Discussions / Database
   

Database

 
QuestionTenant Database Pin
Lav KG30-Mar-06 18:34
Lav KG30-Mar-06 18:34 
AnswerRe: Tenant Database Pin
Colin Angus Mackay31-Mar-06 12:29
Colin Angus Mackay31-Mar-06 12:29 
GeneralRe: Tenant Database Pin
Lav KG2-Apr-06 18:08
Lav KG2-Apr-06 18:08 
AnswerRe: Tenant Database Pin
HimaBindu Vejella2-Apr-06 18:49
HimaBindu Vejella2-Apr-06 18:49 
Questionprimary key duplication Pin
Ritesh123430-Mar-06 18:31
Ritesh123430-Mar-06 18:31 
QuestionSQL server retrival on demand Pin
sameerhanda30-Mar-06 10:27
sameerhanda30-Mar-06 10:27 
AnswerRe: SQL server retrival on demand Pin
Eric Dahlvang31-Mar-06 3:25
Eric Dahlvang31-Mar-06 3:25 
QuestionHow to pass a recordset from server-side asp to client? Pin
Jesse Evans30-Mar-06 9:25
Jesse Evans30-Mar-06 9:25 
Folks,

I'm trying to get data back from my IIS/SQL Server without having to refresh the client's page. I also have to do some calculations on the returned data, which is to be displayed in a table. I'm using Microsoft.XMLHTTP to communicate between the client and server pages as shown below:
<br />
On the client side:<br />
function GetAssyRecs(TheOperator)<br />
{<br />
    var szRequest = "<GetAssyRecs>";<br />
    szRequest += "<TheOperator>" + TheOperator + "</TheOperator>";<br />
    szRequest += "</GetAssyRecs>";<br />
<br />
    var objHTTP = new ActiveXObject("Microsoft.XMLHTTP");<br />
    var szURL = "GetAssyRecs.asp";<br />
    var szHttpMethod = "POST";<br />
    objHTTP.Open(szHttpMethod, szURL, false);<br />
    objHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");<br />
    objHTTP.Send(szRequest);<br />
<br />
    var szReply = objHTTP.ResponseText;<br />
    alert("status: " + objHTTP.status + " Reply: " + szReply);<br />
 }<br />
<br />
On the server side (GetAssyRecs.asp):<br />
<%@ Language=JScript %><br />
<% Response.Expires=0; %><br />
<br />
<%<br />
var adOpenKeyset = 1;<br />
var adPersistXML = 1;<br />
<br />
var objXmlDOM = Server.CreateObject("Microsoft.XMLDOM");<br />
var szXmlRequest = Request.Form;<br />
if (!objXmlDOM.loadXML(szXmlRequest))<br />
{<br />
   var sErrMsg = "Invalid XML Request String: " + szXmlRequest;<br />
   Response.Write(sErrMsg);<br />
   return;<br />
}<br />
<br />
var TheUser = objXmlDOM.selectSingleNode("//TheOperator");<br />
if ((TheUser == null) || (TheUser.text == ""))<br />
{<br />
var sErrMsg = "No TheOperator specified: " + szXmlRequest;<br />
Response.Write(sErrMsg);<br />
return;<br />
}<br />
	<br />
var sql="Select idnum, serial_number, rework_done, thedatetime from IDC_OperatorCounts where operator = '" + TheUser.text + "' and thedatetime > dateadd(hh, -13, getdate()) order by thedatetime asc;";<br />
<br />
var conn=Server.CreateObject("adodb.connection");<br />
conn.ConnectionString="driver={SQL Server};server=xidc-mrtline;database=IDC_Xerox;Trusted_Connection=yes";<br />
conn.Open;<br />
var rs=Server.CreateObject("adodb.recordset");<br />
rs.Open (sql,conn,adOpenKeyset);<br />
rs.Save (Response, adPersistXML);<br />
	<br />
rs.close;<br />
rs=null;<br />
	<br />
conn.Close;<br />
conn=null;<br />
<br />
objXmlDOM = null;<br />
}<br />
%><br />


What I want to do is to cast the returned xml recordset back into an ActiveXObject ("AdoDB.Recordset"), so I can read through the records using the syntax a recordset object offers.

Is this possible?

'til next we type...
HAVE FUN!! -- Jesse
QuestionFirst time programming - need help with database design... Pin
tanpanjang30-Mar-06 7:43
tanpanjang30-Mar-06 7:43 
QuestionPleas help me Pin
papa198030-Mar-06 6:18
papa198030-Mar-06 6:18 
AnswerRe: Pleas help me Pin
Lav KG30-Mar-06 23:32
Lav KG30-Mar-06 23:32 
QuestionPhone number location question Pin
Richard Parsons30-Mar-06 4:29
Richard Parsons30-Mar-06 4:29 
AnswerRe: Phone number location question Pin
Colin Angus Mackay30-Mar-06 4:46
Colin Angus Mackay30-Mar-06 4:46 
QuestionSorting a DataSet for binding to a DataList Pin
cybersurferdev29-Mar-06 22:32
cybersurferdev29-Mar-06 22:32 
QuestionWhat is the command to list all the tables in a data base in SQL server??? Pin
BawaSingh29-Mar-06 21:39
BawaSingh29-Mar-06 21:39 
AnswerRe: What is the command to list all the tables in a data base in SQL server??? Pin
Colin Angus Mackay29-Mar-06 22:10
Colin Angus Mackay29-Mar-06 22:10 
GeneralRe: What is the command to list all the tables in a data base in SQL server??? Pin
BawaSingh29-Mar-06 23:41
BawaSingh29-Mar-06 23:41 
GeneralRe: What is the command to list all the tables in a data base in SQL server??? Pin
Colin Angus Mackay29-Mar-06 23:52
Colin Angus Mackay29-Mar-06 23:52 
GeneralRe: What is the command to list all the tables in a data base in SQL server??? Pin
Le centriste30-Mar-06 4:10
Le centriste30-Mar-06 4:10 
GeneralRe: What is the command to list all the tables in a data base in SQL server??? Pin
HimaBindu Vejella2-Apr-06 19:07
HimaBindu Vejella2-Apr-06 19:07 
AnswerRe: What is the command to list all the tables in a data base in SQL server??? Pin
HimaBindu Vejella2-Apr-06 19:02
HimaBindu Vejella2-Apr-06 19:02 
AnswerRe: What is the command to list all the tables in a data base in SQL server??? Pin
HimaBindu Vejella2-Apr-06 19:10
HimaBindu Vejella2-Apr-06 19:10 
QuestionHaving trouble updating access database. Pin
kornstyle29-Mar-06 11:05
kornstyle29-Mar-06 11:05 
QuestionUsing Queries From An Interface Pin
MontyMole29-Mar-06 7:59
MontyMole29-Mar-06 7:59 
QuestionWhat is the Command to create table from existing tables in SQL server???? Pin
BawaSingh29-Mar-06 3:39
BawaSingh29-Mar-06 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.