Re: HELP! Can't change crystal report database source dynamically!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The connection you initially set the report up with must use windows
security if you're to use that or sql if you're using a specific user.
It doesn't seem to work if you try switching dynamically.
Or at least I couldn't get it to.
This uses windows security.
Stick a user and password in if that's not what you want.


Dim MyTableLogOnInfo As New TableLogOnInfo
Dim MyDBConnectionInfo As New ConnectionInfo

'-----------
Dim log As TableLogOnInfo
Dim tbl As Table

crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "Server"
.DatabaseName = "Database"
.UserID = String.Empty
.Password = String.Empty
End With
For Each tbl In myreport.Database.Tables
log = tbl.LogOnInfo
log.ConnectionInfo = crConnectionInfo
tbl.ApplyLogOnInfo(log)
tbl.Location =
tbl.Location.Substring(tbl.Location.LastIndexOf(".") + 1)
Next

.



Relevant Pages

  • Re: How to SELECT records based upon ASP.NET Roles
    ... security principals directly. ... be able to use SQL row-level security as well (which is something I've never ... When using Windows ... authentication in IIS, this will be a WindowsPrincipal object, but it would ...
    (microsoft.public.dotnet.security)
  • Re: How to SELECT records based upon ASP.NET Roles
    ... security principals directly. ... also be able to use SQL row-level security as well (which is something ... using Windows authentication in IIS, ...
    (microsoft.public.dotnet.security)
  • Re: Windows NT Security
    ... The easiest way is not to do the check from within SQL server back to Windows, ... and grant these permissions on the appropriate stored procedures. ... with the correct/same security permissions - and see if they error. ...
    (microsoft.public.sqlserver.programming)
  • Re: Application password
    ... That is correct -- and with SQL logins, there is no way to enforce ... lock down Windows). ... There biggest effort so far is replacing the sa login ... >hold of that single password there entirely security scheme is broken. ...
    (microsoft.public.sqlserver.security)
  • Is Remote Administrator(radmin) a trojon/virus itself or virus host? Any techniques to make it secur
    ... I newly installed my windows XP with the remote administrator ... which did not report any virus/trojan about RADMIN. ... I am concerned about this and want to know is there any security ...
    (microsoft.public.windowsxp.security_admin)