Showing posts with label means. Show all posts
Showing posts with label means. Show all posts

Friday, March 9, 2012

Need optimization

Dear Advance,

I used one stored procedure to retrive 3 different result set. and in the codebehind i seperate it. means from the dataset i seperate three different datatable and then show my data as my need.

but the main problem is ... after retriving the datafrom the database i have to user foreach loop to bind the coulmns data to my different custom class.
example:

foreach (DataRow oDrow in MyDataTable.Rows) {

oClass=new Class();

oClass.Name1=oDrow["Name1"] .toString();

oClass.Name2=oDrow["Name2"] .toString();
...

}

1. so my first question is there any optimization possible ?

2. my result set is too loong ... so should keep just one hit to database or hit more than one time

Currently i am optimizing my web application. in the previous version 1 have to hit the database 3/4 times for different purposes. but now it hits only one time... but it takes time in the codebehind to perform different operation.

Any Suggestion

Starting point: Asynchronous SQL

SqlCommand.BeginExecuteReader()

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref4/html/O_T_System_Data_SqlClient_SqlCommand_BeginExecuteReader.htm

Saturday, February 25, 2012

Need help, crystal 8.5 trying to open diferent DSN...

Hi...

I have an application in VB6 and CR8.5 with MSSQL, this app is multi-company, means that have to open 1 or more MSSQL databases, opening the first DSN (ODBC) is ok (opening directly is another headache), but when I try to open a diferent DSN to open another DB by code I get the message "Server has not yet been opened".

Note that I am using Crystal Designer and Viewer control, it seems that the crystal is only opening the DSN that is set by default in designer window... I dont know what am I doing wrong...

Thanks in advance

PD1: sorry my english is not good at all...

PD2: This is the code to open report:
--- CODE ----
Dim m_Report As New tax_rpt_anulados 'set original report to variable

m_Report.Database.LogOnServer "pdsodbc.dll", "DSNname","DBname", "username", "password"
m_Report.RecordSelectionFormula = "{tax_anulados.tipoComprobante}=1"
m_Report.ReportTitle = "Title of report"
CRViewer1.ReportSource = m_Report
CRViewer1.ViewReportHi again guys, dont worry about this question I already solved...

Thanks anyway...