S
Sander
Hi I'm trying to use the MSPJGrid for making own reports/lists. I'm having
problems understanding the example that microsoft provides as it does not
make a connection to a database but is adding records to the record set
'manually'.
Can anybody help me with this?
I have modified the sample.htm to the function below, but it is not giving
me any data back on the page (the query is executed on the database seen in
profiler, so something is wrong in binding the data i guess):
function Init() {
var tekst;
var adUseClient = 3;
var adInteger = 3;
var adDate = 7;
var adBoolean = 11;
var adVarWChar = 202;
var Conn = new ActiveXObject("ADODB.Connection");
var rs = new ActiveXObject("ADODB.Recordset");
rs.CursorLocation = adUseClient;
var strSQL = "SELECT PROJ_ID, PROJ_NAME FROM MSP_WEB_PROJECTS WHERE
PROJ_ID =7";
Conn.Open("Provider=SQLOLEDB;Data
Source=localhost;Database=projectserver;integrated security=SSPI");
rs = Conn.Execute(strSQL);
MSPJGrid.Binding = rs;
MSPJGrid.FieldList = "PROJ_ID,PROJ_NAME";
MSPJGrid.Refresh();
MSPJGrid.Outlining = false;
MSPJGrid.Refresh();
MSPJGrid.GanttView = false;
MSPJGrid.Refresh();
}
problems understanding the example that microsoft provides as it does not
make a connection to a database but is adding records to the record set
'manually'.
Can anybody help me with this?
I have modified the sample.htm to the function below, but it is not giving
me any data back on the page (the query is executed on the database seen in
profiler, so something is wrong in binding the data i guess):
function Init() {
var tekst;
var adUseClient = 3;
var adInteger = 3;
var adDate = 7;
var adBoolean = 11;
var adVarWChar = 202;
var Conn = new ActiveXObject("ADODB.Connection");
var rs = new ActiveXObject("ADODB.Recordset");
rs.CursorLocation = adUseClient;
var strSQL = "SELECT PROJ_ID, PROJ_NAME FROM MSP_WEB_PROJECTS WHERE
PROJ_ID =7";
Conn.Open("Provider=SQLOLEDB;Data
Source=localhost;Database=projectserver;integrated security=SSPI");
rs = Conn.Execute(strSQL);
MSPJGrid.Binding = rs;
MSPJGrid.FieldList = "PROJ_ID,PROJ_NAME";
MSPJGrid.Refresh();
MSPJGrid.Outlining = false;
MSPJGrid.Refresh();
MSPJGrid.GanttView = false;
MSPJGrid.Refresh();
}