I am having trouble passing a variable to a SQL statement.
The address of the window is "I need the 1582a in an sql statment. This is my code:
<script LANGUAGE="JavaScript" RUNAT="server">
function _initrstWO()
{
//get address variable
var m_wo = request("wonum"
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('ConnWO_ConnectionTimeout');
DBConn.CommandTimeout = Application('ConnWO_CommandTimeout');
DBConn.CursorLocation = Application('ConnWO_CursorLocation');
DBConn.Open(Application('ConnWO_ConnectionString'),
Application('ConnWO_RuntimeUserName'),
Application('ConnWO_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 1;
cmdTmp.CommandTimeout = 30;
//pass m_wo to sql
cmdTmp.CommandText = 'SELECT calls.*, workorderNum AS wo1 FROM calls WHERE
workorderNum = " & m_wo & " ;'
rsTmp.CacheSize = 100;
rsTmp.CursorType = 3;
rsTmp.CursorLocation = 3;
rsTmp.LockType = 3;
rstWO.setRecordSource(rsTmp);
rstWpen();
Is my problem with the variable passed to the form or the sql code?
Thanks,
Gail [sig][/sig]
The address of the window is "I need the 1582a in an sql statment. This is my code:
<script LANGUAGE="JavaScript" RUNAT="server">
function _initrstWO()
{
//get address variable
var m_wo = request("wonum"
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('ConnWO_ConnectionTimeout');
DBConn.CommandTimeout = Application('ConnWO_CommandTimeout');
DBConn.CursorLocation = Application('ConnWO_CursorLocation');
DBConn.Open(Application('ConnWO_ConnectionString'),
Application('ConnWO_RuntimeUserName'),
Application('ConnWO_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 1;
cmdTmp.CommandTimeout = 30;
//pass m_wo to sql
cmdTmp.CommandText = 'SELECT calls.*, workorderNum AS wo1 FROM calls WHERE
workorderNum = " & m_wo & " ;'
rsTmp.CacheSize = 100;
rsTmp.CursorType = 3;
rsTmp.CursorLocation = 3;
rsTmp.LockType = 3;
rstWO.setRecordSource(rsTmp);
rstWpen();
Is my problem with the variable passed to the form or the sql code?
Thanks,
Gail [sig][/sig]