mikefox Level: Trainee
 Registered: 26-04-2007 Posts: 2
|
Re: how to open CRYSTAL REPORT if database have password?
I uses crystal for my reports, but i don't actually get the data needed to the backend dabase... try making a temporary database (mdb) for that matter... when you execute query save the data to the temporary database....
Dim mytable As New ADODB.Recordset
temp As New ADODB.Connection
mytable.open "select * from [tablename] where [field] = [expression]" [connection], adOpenStatic, adLockReadOnly
if mytable.recordcount <> 0 then
do until mytable.eof
'execute query here....
Temp.execute "INSERT INTO [tablename] (field1, field2, field3) values ([FieldFrom myTable])
mytable.movenext
loop
endif
table.close
set table = nothing
Hope this help.....
|