
Hlp on CR 8.5 and VB 6.0 sp5
Quote:
>-----Original Message-----
>Thx for replying Iztok... but actually I have printed the
report already...
>my problem is that the DB Connection never shuts
down... :S
>Any idea?
>--
>Saludos.
>Edgar Contreras
>(Gua de netiquette del foro)
>http://perso.wanadoo.es/rubenvigon/foro
>"La informacion es presentada como es y sin garantia
alguna"
>> >-----Original Message-----
>> >Well, the story is this...
>> >I've done a few reports with CR and opened'em on VB
with
>> no problems...
>> >'till now, I've designed my reports using an ODBC
>> connection and whenever a
>> >shut my app, the connecition to the database was shut
as
>> well... but now, I
>> >have made a report with an ADO connection and my DB
>> connection never
>> >shutsdown I've tried to do cnn.close more than once and
>> it shows an error
>> >msg saying that the connection is already closed (which
>> sounds logical) but
>> >still I can see the DB engine running.
>> >I must say that I close the recordset that I send to
the
>> report as soon as
>> >the preview window is closed.
>> >I have also tried to do the
>> crxReport.Database.LogoffServer method but it
>> >says that the server cannot shut down 'cause thera are
>> reports still using
>> >it even if there is none!
>> >Please any tip will be very much appreciated...
>> >P.S. I am using Sybase SQL Anywhere 5.0, that's why I
>> know that the engine
>> >is still running ('cause This version of Sybase opens a
>> connection window)
>> >--
>> >Saludos.
>> >Edgar Contreras
>> >.
>> Dim Report As New ReportName
>> Dim M_R As New ADOR.Recordset
>> M_R.Open "SELECT * FROM DataSource"
>> Report.Database.SetDataSource M_R
>> CRViewer1.ReportSource = Report
>.
' Reference to Microsoft ActiveX Data Objects Recordset 2.7
' Library(C:\Program Files\Common
Files\System\ADO\Msado15.dll)
Dim Report As New CrystalReport1
Dim M_Recordset As New ADOR.Recordset
Dim sCnstr as String
Dim sRecordset as String
sCnstr = "Provider = MSDASQL.1;Persist Security
Info=False;Extended
properties='DSN=sqls;Description=systemdesc;UID=;PWD=;APP=V
isual Basic;WSID=;Network=DBMSSOCN;Address=;Initial
Catalog='"
sRecordset="SELECT * FROM DataSource"
M_Recordset.Open sRecordset,sCnstr
Report.Database.SetDataSource M_Recordset
CRViewer1.ReportSource = Report
.
Iztok Hudales