Tuesday, February 14, 2012
Client connect with static Port (over Dynamic)
We have a server in our DMZ which need to talk (SECURLEY) with SQL 2000 i
have done this...by configuring a really tight rule on our firewall. This
trafic only needs to be inbound to SQL.
However it would appear that though the SQL Server listenes on port the
client 1433 The clien port which is posting the info to SQL is Dynamic.
Can i specify that my Client only connect using a pre specified port which i
can then allow in my Firewall rule...
Kind Regards
Paul
Depends on the client - how the client is connecting, from
where, how many, what app, etc. You can use the client
network utility and create an alias for the server. You can
set the port in the alias you create.
Or you can specify the port in the connection string - set
the data source to the IP or server name followed by a comma
and then the port number:
Data Source=xxx.xxx.xxx.xxx,1433;
-Sue
On Fri, 2 Feb 2007 04:50:00 -0800, PK
<PK@.discussions.microsoft.com> wrote:
>Hi all
>We have a server in our DMZ which need to talk (SECURLEY) with SQL 2000 i
>have done this...by configuring a really tight rule on our firewall. This
>trafic only needs to be inbound to SQL.
>However it would appear that though the SQL Server listenes on port the
>client 1433 The clien port which is posting the info to SQL is Dynamic.
>Can i specify that my Client only connect using a pre specified port which i
>can then allow in my Firewall rule...
>Kind Regards
>Paul
Friday, February 10, 2012
clearing reportviewer and reload of dynamic report
I have an application that builds the SQL Select statement and creates the report in ReportViewer. The trouble is this, it will not reset the data that is already loading in the report. I have to close out of the ReportViewer screen and come back in to make new selection options. What am I missing?.
ReportViewer.ProcessingMode = ProcessingMode.Local
Dim rView As LocalReport = ReportViewer.LocalReport
rView.ReportPath = "myReport.rdlc"
Dim ds As DataSet = GetDonorData() '<-- This executes my sql query
Dim dsDonor As New ReportDataSource()
dsDonor.Name = "dsDonor_Data"
dsDonor.Value = ds.Tables("dsDonor")
rView.DataSources.Add(dsDonor)
PrivateFunction GetDonorData()
Dim dsDispAsNew DataSet
Dim sqlDonorDataAsString ="SELECT * from Table Where Class =" & selitem
Using connectionAsNew SqlConnection("Data Source=Server;"persist security info=False;Database=Test")
Dim commandAsNew SqlCommand(sqlDonorData, connection)
Dim DonorAdapterAsNew SqlDataAdapter(command)
DonorAdapter.Fill(dsDisp,"dsDonor")
DonorAdapter.Dispose()
command.Dispose()
Return dsDisp
EndFunction
If anyone is interested, I added:
"rView.DataSources.Clear" just before the add statement.
Thanksklschultz013
For anyone interested this is slightly different and in C#
//RV2 is the report
RV2.ProcessingMode = ProcessingMode.Local;
RV2.LocalReport.ReportPath = "Reporting/ReportBookings.rdlc"; //the physical name of the report
DataSet ds = RunStoredProcSelect(spStr, ParsArray, ParCnt);//function to return a dataset
ReportDataSource rptds = new ReportDataSource();
rptds.Name = "DataSet1_bBookingSelect";//Name of the Datasource in the Report [as in the report designer]
rptds.Value = ds.Tables[0];
RV2.LocalReport.DataSources.Clear();
RV2.LocalReport.DataSources.Add(rptds);
RV2.LocalReport.Refresh();