Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Friday, March 30, 2012

Help in Crystal Report

Hi,

I am new in crystal report (using vb.net). Currenlty, my report format
looks like below:

School : ABC
Class : A1
======================================
Details Stud1 IC No1 Address1
Stud2 IC No.2 Address2

Page Footer: Page 1

School : ABC
Class : A2
======================================
Details Stud3 IC No1 Address1
Stud4 IC No.2 Address2

Page Footer: Page 2

School : DBF
Class : A1
======================================
Details Stud1 IC No1 Address1
Stud2 IC No.2 Address2

Page Footer: Page 3

School : DBF
Class : A2
======================================
Details Stud3 IC No1 Address1
Stud4 IC No.2 Address2

Page Footer: Page 4

Both School and Class formula were placed in Page Header. Also, I have
two group headers ie. School then follows by Class (before the details
section). Currently, the report prints at new page for every different
Class.

How do I print the all classes of the same School continuously without
page break; and only move to new page if the current page has been
filled up. I need both the Class and School names to appear in every
new page. Also, For every new school, it should be a fresh new page ie.
should not mix the details with other school. Can anyone help in this
problem? Many thanks!Hi,

I hope you are using two groups. That means the grouping is made on "School" field as well as "Class" field. uncheck the "NEW page AFTER" under the "Class " group footer and check the same in "School" group footer.
For heading should be shown in all pages, check the "Repeat Group header on each page" Group Expert option

I hope , you got what you wanted

Help importing legacy FoxPro db into SQL 2000

Greetings,
Any help/tips appreciated. I'm charged with importing a legacy FoxPro
database appliction into SQL 2000 and building a new .NET front-end for it.
I've imported .mdb, Excel, text files, other MS SQL data, etc in the past,
but the FoxPro stuff is rather different. I see the .dbf files (which I'm
guessing will import as tables), but when I try to import, the DSN import bo
x
comes up. I try 'Visual FoxPro drivers' but they're not installed. A little
research shows MS stopped bundling FoxPro drivers in MDAC 2.6.
Does anyone have experience with this type of import?
Thanks in advance!
jgHi Johnny,
Download and install the FoxPro and Visual FoxPro OLE DB data provider from
msdn.microsoft.com/vfoxpro/downloads/updates.
When you set up your import you'll want to determine whether you have a
database container (a DBC file is present in the directory where the DBFs
are) or free tables. With a DBC you connect to the DBC and with free tables
you just connect to the directory they are in.
After that it's just like importing any other OLE DB compliant data.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"johnnyG" <johnnyG@.discussions.microsoft.com> wrote in message
news:CBE76BA7-C433-4EDD-8C73-123690CAA92E@.microsoft.com...
> Greetings,
> Any help/tips appreciated. I'm charged with importing a legacy FoxPro
> database appliction into SQL 2000 and building a new .NET front-end for
> it.
> I've imported .mdb, Excel, text files, other MS SQL data, etc in the past,
> but the FoxPro stuff is rather different. I see the .dbf files (which I'm
> guessing will import as tables), but when I try to import, the DSN import
> box
> comes up. I try 'Visual FoxPro drivers' but they're not installed. A
> little
> research shows MS stopped bundling FoxPro drivers in MDAC 2.6.
> Does anyone have experience with this type of import?
> Thanks in advance!
> jg|||If the original appliation is pre-VFP, then it's probably not normalized, so
you'll want to re-think the database model as well. I've seen legacy -> SQL
Server ports where this was not done.
"Cindy Winegarden" <cindy_winegarden@.msn.com> wrote in message
news:eFWvPxZLGHA.2904@.TK2MSFTNGP10.phx.gbl...
> Hi Johnny,
> Download and install the FoxPro and Visual FoxPro OLE DB data provider
> from msdn.microsoft.com/vfoxpro/downloads/updates.
> When you set up your import you'll want to determine whether you have a
> database container (a DBC file is present in the directory where the DBFs
> are) or free tables. With a DBC you connect to the DBC and with free
> tables you just connect to the directory they are in.
> After that it's just like importing any other OLE DB compliant data.
> --
> Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@.msn.com www.cindywinegarden.com
>
> "johnnyG" <johnnyG@.discussions.microsoft.com> wrote in message
> news:CBE76BA7-C433-4EDD-8C73-123690CAA92E@.microsoft.com...
>|||Thanks guys...I downloaded the data provider and found the DBC and managed t
o
successfully import the tables. I'm reviewing the warnings now (some date
data type precision issues), but overall I'm underway. Thanks Cindy.
And JT thanks for the sound advice also...
johnnG
"johnnyG" wrote:

> Greetings,
> Any help/tips appreciated. I'm charged with importing a legacy FoxPro
> database appliction into SQL 2000 and building a new .NET front-end for it
.
> I've imported .mdb, Excel, text files, other MS SQL data, etc in the past,
> but the FoxPro stuff is rather different. I see the .dbf files (which I'm
> guessing will import as tables), but when I try to import, the DSN import
box
> comes up. I try 'Visual FoxPro drivers' but they're not installed. A litt
le
> research shows MS stopped bundling FoxPro drivers in MDAC 2.6.
> Does anyone have experience with this type of import?
> Thanks in advance!
> jg|||Hi Johnny,
In case you haven't figured it out yet, FoxPro Date data types (a date only,
no time) can be "empty" as well as null or having a valid date. SQL Server
doesn't know how to handle these and substitutes 12/31/1899 or 1/1/1900. The
same goes with DateTime data types.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"johnnyG" <johnnyG@.discussions.microsoft.com> wrote in message
news:FFFBC100-6D09-41CC-BB40-0452495014D2@.microsoft.com...
> Thanks guys...I downloaded the data provider and found the DBC and managed
> to
> successfully import the tables. I'm reviewing the warnings now (some date
> data type precision issues), but overall I'm underway. Thanks Cindy.
> And JT thanks for the sound advice also...sql

help- how to retrive image from sql server 2000 database

hi,
i m use asp.net 1.1.

i want to retrive image or picture from sql server 2000 database.

what should i do?

plz give "sample code" and solution.

it's urgent.

thanks in advanceone more thing,

i want to put that retrived image into asp.net's "image web control".

what should i do?
give solution.

thanks one's again.

Wednesday, March 28, 2012

Help for report(rsInvalidItemPath)

Hi
I have beening trying to build a report with 2 parameters. When I run it
under VS.net, it all went well, but after I deploy it to the server, I got
the message as following: **Reporting Services Error--The path of the item ''
is not valid. The full path must be less than 260 characters long, must start
with slash; other restrictions apply. Check the documentation for complete
set of restrictions. (rsInvalidItemPath) Get Online Help **
what went wrong, please help.
the URL as following:
http://localhost/reportserver?%2fRev_Stats%2fRev_Stats&rs:Command=Render
TIAThe url looks correct. Did you get this url by navigating to the
reportserver virtual directory? Is there anything more in the
reportserver_<timestamp>.log file?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"wd1153" <wd1153@.discussions.microsoft.com> wrote in message
news:2B5DBCB5-B943-4675-997B-145DF0ECDF17@.microsoft.com...
> Hi
> I have beening trying to build a report with 2 parameters. When I run it
> under VS.net, it all went well, but after I deploy it to the server, I got
> the message as following: **Reporting Services Error--The path of the item
> ''
> is not valid. The full path must be less than 260 characters long, must
> start
> with slash; other restrictions apply. Check the documentation for complete
> set of restrictions. (rsInvalidItemPath) Get Online Help **
> what went wrong, please help.
> the URL as following:
> http://localhost/reportserver?%2fRev_Stats%2fRev_Stats&rs:Command=Render
> TIA
>sql

Friday, March 23, 2012

Help creating Embedded code Function

How can I create a VB.NET function to run my query below that my SSRS report can run to retreive TotalPostingDays so I can show that in a textbox in my report? I need help creating the function in the Report properties of my SSRS report and not sure how to call this stored procedure to return TotalPostingDays.

I need to do this calculation by using a UDF, not stored procedure maybe. The problem is, I do still need to do a lookup to my Holiday table as part of my UDF though; the rest can proabably be done in Straight VB for the weekend and other calculations:
LTER PROCEDURE SSRS_Return_TotalPostingDays

AS

DECLARE @.TotalDaysInMonth int,
@.today datetime,
@.TotalWeekendDays int,
@.TotalHolidaysThisMonth int,
@.TotalPostingDays int

SET @.today = GETDATE()

-- TOTAL DAYS THIS MONTH
SET @.TotalDaysInMonth = CASE WHEN DatePart(mm,GetDate()) IN (1,3,5,7,8,10,12) THEN
31
ELSE
DateDiff(day,GetDate(),DateAdd(mm, 1, GetDate()))
END


-- TOTAL HOLIDAYS THIS MONTH
SELECT @.TotalHolidaysThisMonth = (SELECT COUNT(*) FROM ReportingServer.dbo.Holidays
WHERE HolidayDate BETWEEN (DATEADD(DAY, -DATEPART(DAY, @.today) + 1, @.today))
AND (DATEADD(DAY, -DATEPART(DAY, @.today), DATEADD(MONTH, 1, @.today))))

-- TOTAL # WEEKEND DAYS THIS MONTH

DECLARE @.date DATETIME
SET @.date = '20060101'

SELECT @.TotalWeekendDays = 8 +
CASE WHEN ISDATE(CONVERT(CHAR(6), @.date, 112) + '29') = 1 THEN
CASE WHEN DATENAME(WEEKDAY, CONVERT(CHAR(6), @.date, 112) + '01') IN ('Saturday', 'Sunday')
THEN 1 ELSE 0 END ELSE 0 END +
CASE WHEN ISDATE(CONVERT(CHAR(6), @.date, 112) + '30') = 1 THEN
CASE WHEN DATENAME(WEEKDAY, CONVERT(CHAR(6), @.date, 112) + '02') IN ('Saturday', 'Sunday')
THEN 1 ELSE 0 END ELSE 0 END +
CASE WHEN ISDATE(CONVERT(CHAR(6), @.date, 112) + '31') = 1 THEN
CASE WHEN DATENAME(WEEKDAY, CONVERT(CHAR(6), @.date, 112) + '03') IN ('Saturday', 'Sunday')
THEN 1 ELSE 0 END ELSE 0 END

SET @.TotalPostingDays = @.TotalDaysInMonth - (@.TotalHolidaysThisMonth + @.TotalWeekendDays)
RETURN @.TotalPostingDays


for the holiday lookup, I can probably do something like this then use the variable below to proceed or something:
Dim intTotalPostingDays As Integer
Dim objConn As New SqlConnection("Data Source=server;Initial Catalog=database; integrated security=SSPI;persist security info=False; Trusted_Connection=Yes")
Dim objComm As New SqlCommand("SSRS_Return_TotalHolidaysThisMonth", objConn)
objComm.CommandType = CommandType.StoredProcedure
Dim returnValueParam As New SqlClient.SqlParameter("@.RETURN_VALUE", SqlDbType.Int)
objComm.Parameters.Add(returnValueParam)
objComm.Connection.Open()
Dim objReader As SqlClient.SqlDataReader = objComm.ExecuteReader()
intTotalHolidays = returnValueParam.Value()

should I use executescalar instead of datareader? I am not sure where to go here for the entire function that I need so I can get this into my SSRS report.

I would do it a little more simply and call the stored procedure using the RS data source and query functionality. You can call the stored procedure and create a one row data set to use in your report.

Forgot to add you can have multiple datasets in your report, so you are not limited to this query.

|||actually, that's not a bad idea...thanks, will try it.|||

For some reason, completely forgot about datasets in my report! I had initially created one to run a Stored Proc as the DataSet...then I just added another to run this stored proc to return the field then added that field to a textbox and that was it!

thanks for refreshing my memory about datasource, which lead me to create a new dataset instead!

Help creating Embedded code Function

How can I create a VB.NET function to run my query below that my SSRS report can run to retreive TotalPostingDays so I can show that in a textbox in my report? I need help creating the function in the Report properties of my SSRS report and not sure how to call this stored procedure to return TotalPostingDays.

I need to do this calculation by using a UDF, not stored procedure maybe. The problem is, I do still need to do a lookup to my Holiday table as part of my UDF though; the rest can proabably be done in Straight VB for the weekend and other calculations:
LTER PROCEDURE SSRS_Return_TotalPostingDays

AS

DECLARE @.TotalDaysInMonth int,
@.today datetime,
@.TotalWeekendDays int,
@.TotalHolidaysThisMonth int,
@.TotalPostingDays int

SET @.today = GETDATE()

-- TOTAL DAYS THIS MONTH
SET @.TotalDaysInMonth = CASE WHEN DatePart(mm,GetDate()) IN (1,3,5,7,8,10,12) THEN
31
ELSE
DateDiff(day,GetDate(),DateAdd(mm, 1, GetDate()))
END


-- TOTAL HOLIDAYS THIS MONTH
SELECT @.TotalHolidaysThisMonth = (SELECT COUNT(*) FROM ReportingServer.dbo.Holidays
WHERE HolidayDate BETWEEN (DATEADD(DAY, -DATEPART(DAY, @.today) + 1, @.today))
AND (DATEADD(DAY, -DATEPART(DAY, @.today), DATEADD(MONTH, 1, @.today))))

-- TOTAL # WEEKEND DAYS THIS MONTH

DECLARE @.date DATETIME
SET @.date = '20060101'

SELECT @.TotalWeekendDays = 8 +
CASE WHEN ISDATE(CONVERT(CHAR(6), @.date, 112) + '29') = 1 THEN
CASE WHEN DATENAME(WEEKDAY, CONVERT(CHAR(6), @.date, 112) + '01') IN ('Saturday', 'Sunday')
THEN 1 ELSE 0 END ELSE 0 END +
CASE WHEN ISDATE(CONVERT(CHAR(6), @.date, 112) + '30') = 1 THEN
CASE WHEN DATENAME(WEEKDAY, CONVERT(CHAR(6), @.date, 112) + '02') IN ('Saturday', 'Sunday')
THEN 1 ELSE 0 END ELSE 0 END +
CASE WHEN ISDATE(CONVERT(CHAR(6), @.date, 112) + '31') = 1 THEN
CASE WHEN DATENAME(WEEKDAY, CONVERT(CHAR(6), @.date, 112) + '03') IN ('Saturday', 'Sunday')
THEN 1 ELSE 0 END ELSE 0 END

SET @.TotalPostingDays = @.TotalDaysInMonth - (@.TotalHolidaysThisMonth + @.TotalWeekendDays)
RETURN @.TotalPostingDays


for the holiday lookup, I can probably do something like this then use the variable below to proceed or something:
Dim intTotalPostingDays As Integer
Dim objConn As New SqlConnection("Data Source=server;Initial Catalog=database; integrated security=SSPI;persist security info=False; Trusted_Connection=Yes")
Dim objComm As New SqlCommand("SSRS_Return_TotalHolidaysThisMonth", objConn)
objComm.CommandType = CommandType.StoredProcedure
Dim returnValueParam As New SqlClient.SqlParameter("@.RETURN_VALUE", SqlDbType.Int)
objComm.Parameters.Add(returnValueParam)
objComm.Connection.Open()
Dim objReader As SqlClient.SqlDataReader = objComm.ExecuteReader()
intTotalHolidays = returnValueParam.Value()

should I use executescalar instead of datareader? I am not sure where to go here for the entire function that I need so I can get this into my SSRS report.

I would do it a little more simply and call the stored procedure using the RS data source and query functionality. You can call the stored procedure and create a one row data set to use in your report.

Forgot to add you can have multiple datasets in your report, so you are not limited to this query.

|||actually, that's not a bad idea...thanks, will try it.|||

For some reason, completely forgot about datasets in my report! I had initially created one to run a Stored Proc as the DataSet...then I just added another to run this stored proc to return the field then added that field to a textbox and that was it!

thanks for refreshing my memory about datasource, which lead me to create a new dataset instead!

sql

Wednesday, March 21, 2012

Help connecting to SQLEXPRESS using asp.net

WE have just upgraded our database from sql 2000 to sql express.
Nowthe asp.net code doesn't work. I tried many different things, no
luck. Please help! thanks very much.
Here is the connection code:
conn = New SqlConnection( "Server=xxx.xxx.net,1433; UID=User;
PWD=lxxx2007;Database=mssql3" )
strSelect = " Select * from dbo.New_Broker_Table INNER JOIN
dbo.UserList ON dbo.New_Broker_Table.Broker_ID = dbo.UserList.Broker_ID WHERE dbo.UserList.User_ID =@.userID "
cmdSelect = New SqlCommand( strSelect, conn )
cmdSelect.Parameters.Add( "@.userID", session("userid") )
conn.Open()
dtrEmployee = cmdSelect.ExecuteReader( CommandBehavior.SingleRow )
i keep getting the SQL Server does not exist or access denied error.If you are trying to connect remotely, then the problem could be that SQL
Server Express installs by default with disabled remote connections. Here is
an article that outlines the steps to allow remote connections, as well as
setting up exception in the firewall and starting the SQL Server Browser
service, which could be the problem too:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
Next is to check the correct server instance. By default SQL Server Express
installs under a named instance SQLEXPRESS, so you may need to add that to
the Server parameter in your connection string. You can also remove the hard
coded port number in the connection string.
If all that fails then you can see some good connectivity troubleshooting
steps here:
http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx
HTH,
Plamen Ratchev
http://www.SQLStudio.com|||Addition to Plamen's msg.
You receive a "SQL Server does not exist or access denied" error message
when you try to connect to a SQL Server named instance in a cluster by using
TCP/IP sockets:
http://support.microsoft.com/kb/888228/en-us
--
Ekrem Önsoy
http://www.ekremonsoy.net , http://ekremonsoy.blogspot.com
MCBDA, MCITP:DBA, MCSD.Net, MCSE, MCBMSP, MCT
<lytung@.gmail.com> wrote in message
news:1193969000.898641.140040@.e9g2000prf.googlegroups.com...
> WE have just upgraded our database from sql 2000 to sql express.
> Nowthe asp.net code doesn't work. I tried many different things, no
> luck. Please help! thanks very much.
> Here is the connection code:
> conn = New SqlConnection( "Server=xxx.xxx.net,1433; UID=User;
> PWD=lxxx2007;Database=mssql3" )
> strSelect = " Select * from dbo.New_Broker_Table INNER JOIN
> dbo.UserList ON dbo.New_Broker_Table.Broker_ID => dbo.UserList.Broker_ID WHERE dbo.UserList.User_ID =@.userID "
> cmdSelect = New SqlCommand( strSelect, conn )
> cmdSelect.Parameters.Add( "@.userID", session("userid") )
> conn.Open()
> dtrEmployee = cmdSelect.ExecuteReader( CommandBehavior.SingleRow )
> i keep getting the SQL Server does not exist or access denied error.
>

Help connecting pages which has Database connection.

I am a completely new asp.net / SQL server user.
I've been only working with PHP + MYSQL server before which is very different.

There are databases which come with the SQLserver, such as "master"
and there are databases which i create by my own.

When using "master" database, everything works fine.
here's a screenshot.
http://img528.imageshack.us/img528/57/d1if7.jpg

but when using database which i created by my own, i get an error
whether i use ip or localhost.
http://img513.imageshack.us/img513/4598/d2iz7.jpg

only when i use the debugger, it gives me some port, then i am able to connect but only using localhost... therefore i can't give the adress to anyone else.
http://img528.imageshack.us/img528/3394/d3jn6.jpg

What's the difference between the Built in databases and those i create?
how can i make that i could access pages which has database connection to databases i created by my own??

Sorry for my English, i know it's not really understandable.Anyone? it seems like something which everyone who uses asp.net with sql server for a while should know.
ty.

Help configuring database to work as intended

Hello everyone, I have created my web application in VS 2005 using asp.net 2.0 and the built in sql .mdf database creater that comes with visual studio. After I developed my website, I then wanted to move it to one of our servers on the network, which I did without a problem. The website works fine but here is my challange. I need users to be able to connect to the database via login script and the script inserts computer data into the database. So I figured I need to attach the Database to SQL Server 2005. When I try to do this it gives me this database is in use. So I stop the website in IIS, and it allows me to add the database into the SQL Server. Once I do this, and start the website again, the website no longer works and I get a bunch of database errors, that do not get fixed untill I re-copy the website to the server.

Is there a way to just connect to a .mdf file on the network that is not attached to a sql server, through a connection string in a login script? Maybe there is something else I need to do to the database before copying to the server? Or should I re-programm the website with a newly created database in SQL Server, and use that as the datasource?

There is no need to stop the webserver to copy or attach the database. to attach the database bring the particular database to offline and copy the mdf and ldf as per u r required location.

Thank u

Baba

Please remember to click "Mark as Answer" on this post if it helped you.

|||

Ok but then why, when I attach the database to a SQL Server, and try to run the website again, it no longer works? It gives me a bunch of database errors that basiaclly come down to, the database is already open.

|||

Hi,

using asp.net 2.0 and the built in sql .mdf datab

From your description, it seems that you want to move the mdf file in SQLExpress to SQLServer2005, right?

If so, I suggest that you can use aspnet_regsql tool to achieve that. The ASP.NET SQL Server Registration tool is used to create a Microsoft SQL Server database for use by the SQL Server providers in ASP.NET, or to add or remove options from an existing database. The Aspnet_regsql.exe file is located in the [drive:]\%windir%\Microsoft.NET\Framework\version folder on your Web server.

You can give the option '-d' to specify the name of the database to create or modify for use with application services. If the database is not specified, the default database name of "aspnetdb" is used.

For details, see:http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx

Thanks.

sql

Help calling DTS package.

I'm new to using DTS packages and I'm running into a problem. Hopefully someone can help me out. I have an ASP.NET page that needs to call a DTS package. Everything seems to be working right up until I call opkg.Execute. The package seems to run but nothing happens. After further investigation I have found what looks like a permissions issue. this is the message I'm getting"
Error Number:
-2147467259 {Integer}

Error Description:
"The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data." {String}

This is obviously a permissions issue. I'm just not sure who the DTS package is running as and where to set the permissions.

Any ideas??

ThanksAfter a few modifications I'm getting a different error now. But it still is obviously a permissions problem. Everything I've read says set Impersonation equal to true. Unfortunately it already is. Any suggestions from you SQL Server gurus?

"Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."

Thankssql

Monday, March 19, 2012

Help about running SQL CE on Win CE 4.2

Hi everybody,

I developed mobile programs for WM5.0 with C#.NET using SQL Mobile. (Visual Studio 2005, SQL Server 2005 Mobile, Mobile SDK)

But I couldn't run SQL CE on WinCE 4.2 ? (Visual Studio 2003, SQL Server 2000 CE). For example on emulator, an Insert command is running successfully. But on device (Intermec CK 31) we are getting error.

Here is my code :

using System;

using System.Data;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data.SqlServerCe;

namespace UmurBS.Forms.BasimSayimForms

{

publicclass bsEkleForm : System.Windows.Forms.Form

{

private System.Windows.Forms.DataGrid dg;

private System.Windows.Forms.Button button1;

private System.Data.SqlServerCe.SqlCeConnection sqlceconn;

privatestring connstr = "DATA SOURCE = UmurDB.sdf";

public bsEkleForm()

{

InitializeComponent();

}

protectedoverridevoid Dispose( bool disposing )

{

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

privatevoid InitializeComponent()

{

this.button1 = new System.Windows.Forms.Button();

this.dg = new System.Windows.Forms.DataGrid();

//

// button1

//

this.button1.Location = new System.Drawing.Point(160, 264);

this.button1.Text = "button1";

this.button1.Click += new System.EventHandler(this.button1_Click);

//

// dg

//

this.dg.Location = new System.Drawing.Point(8, 8);

this.dg.Size = new System.Drawing.Size(224, 200);

this.dg.Text = "dg";

//

// bsEkleForm

//

this.ClientSize = new System.Drawing.Size(237, 291);

this.Controls.Add(this.dg);

this.Controls.Add(this.button1);

this.Text = "bsEkleForm";

}

#endregion

privatevoid button1_Click(object sender, System.EventArgs e)

{

sqlceconn = new System.Data.SqlServerCe.SqlCeConnection(connstr);

this.ekle();

}

privatevoid ekle()

{

try

{

SqlCeCommand cmd = new SqlCeCommand("insert into test (testValue) values ('hi world')", sqlceconn);

sqlceconn.Open();

int rowsaffected = cmd.ExecuteNonQuery();

}

catch(Exception exc)

{

MessageBox.Show(exc.Message);

}

finally

{

if (sqlceconn != null)

if (sqlceconn.State == ConnectionState.Open)

sqlceconn.Close();

}

}

}

}

Any idea ?

Regards

Serkan

In order to run SQL Mobile on WinCE 4.2 devices, you will have to request the following hotfix from Microsoft: http://support.microsoft.com/default.aspx/kb/924811

Hope this assists.

|||

Hi Erik

Actually I don't understand what must I do? Which files I must download? I have an Intermec CK 31 mobile device.

When I install CF 2.0 SP1 on it, I getting "not compatible" error. But completing install. But application does not run. :(

Thanks for any help , suggesstions.

Regards

Serkan

|||Which processsor architecture is your Intermec device based on - you must load the corresponding cabs for both .NET CF and SQL CE.|||

Hi Erik,

Processor is Intel XScale PXA255, 400 MHz . I think Architecture is ARM4.

|||

You need to call Microsoft support for the hotfix, for your Intermec device, you need to request the following files:

For ARMV4i-based devices

File name File version File size Date TimeSqlce30.dev.enu.wce4.armv4i.cabNot Applicable302,36802-Apr-200615:14Sqlce30.repl.wce4.armv4i.cabNot Applicable727,81902-Apr-200615:14Sqlce30.wce4.armv4i.cabNot Applicable1,586,50102-Apr-200615:14

as the only cab files made available for Windows CE 4.2 are for PocketPC devices, not general Windows CE 4.2 Devices.

ie: sqlce30.ppc.wce4.armv4.CAB, sqlce30.repl.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB

You may need to have a look at this as well: http://support.microsoft.com/kb/914829/

Help about running SQL CE on Win CE 4.2

Hi everybody,

I developed mobile programs for WM5.0 with C#.NET using SQL Mobile. (Visual Studio 2005, SQL Server 2005 Mobile, Mobile SDK)

But I couldn't run SQL CE on WinCE 4.2 ? (Visual Studio 2003, SQL Server 2000 CE). For example on emulator, an Insert command is running successfully. But on device (Intermec CK 31) we are getting error.

Here is my code :

using System;

using System.Data;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data.SqlServerCe;

namespace UmurBS.Forms.BasimSayimForms

{

public class bsEkleForm : System.Windows.Forms.Form

{

private System.Windows.Forms.DataGrid dg;

private System.Windows.Forms.Button button1;

private System.Data.SqlServerCe.SqlCeConnection sqlceconn;

private string connstr = "DATA SOURCE = UmurDB.sdf";

public bsEkleForm()

{

InitializeComponent();

}

protected override void Dispose( bool disposing )

{

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

this.button1 = new System.Windows.Forms.Button();

this.dg = new System.Windows.Forms.DataGrid();

//

// button1

//

this.button1.Location = new System.Drawing.Point(160, 264);

this.button1.Text = "button1";

this.button1.Click += new System.EventHandler(this.button1_Click);

//

// dg

//

this.dg.Location = new System.Drawing.Point(8, 8);

this.dg.Size = new System.Drawing.Size(224, 200);

this.dg.Text = "dg";

//

// bsEkleForm

//

this.ClientSize = new System.Drawing.Size(237, 291);

this.Controls.Add(this.dg);

this.Controls.Add(this.button1);

this.Text = "bsEkleForm";

}

#endregion

private void button1_Click(object sender, System.EventArgs e)

{

sqlceconn = new System.Data.SqlServerCe.SqlCeConnection(connstr);

this.ekle();

}

private void ekle()

{

try

{

SqlCeCommand cmd = new SqlCeCommand("insert into test (testValue) values ('hi world')", sqlceconn);

sqlceconn.Open();

int rowsaffected = cmd.ExecuteNonQuery();

}

catch(Exception exc)

{

MessageBox.Show(exc.Message);

}

finally

{

if (sqlceconn != null)

if (sqlceconn.State == ConnectionState.Open)

sqlceconn.Close();

}

}

}

}

Any idea ?

Regards

Serkan

In order to run SQL Mobile on WinCE 4.2 devices, you will have to request the following hotfix from Microsoft: http://support.microsoft.com/default.aspx/kb/924811

Hope this assists.

|||

Hi Erik

Actually I don't understand what must I do? Which files I must download? I have an Intermec CK 31 mobile device.

When I install CF 2.0 SP1 on it, I getting "not compatible" error. But completing install. But application does not run. :(

Thanks for any help , suggesstions.

Regards

Serkan

|||Which processsor architecture is your Intermec device based on - you must load the corresponding cabs for both .NET CF and SQL CE.|||

Hi Erik,

Processor is Intel XScale PXA255, 400 MHz . I think Architecture is ARM4.

|||

You need to call Microsoft support for the hotfix, for your Intermec device, you need to request the following files:

For ARMV4i-based devices

File name

File version

File size

Date

Time

Sqlce30.dev.enu.wce4.armv4i.cab

Not Applicable

302,368

02-Apr-2006

15:14

Sqlce30.repl.wce4.armv4i.cab

Not Applicable

727,819

02-Apr-2006

15:14

Sqlce30.wce4.armv4i.cab

Not Applicable

1,586,501

02-Apr-2006

15:14

as the only cab files made available for Windows CE 4.2 are for PocketPC devices, not general Windows CE 4.2 Devices.

ie: sqlce30.ppc.wce4.armv4.CAB, sqlce30.repl.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB

You may need to have a look at this as well: http://support.microsoft.com/kb/914829/

Monday, March 12, 2012

HELP ! Login failed for user MachineName\ASPNET

Hi,

I am new to ASP.NET and have an ever approaching deadline to develop a database driven web application. Having read a lot of articles on the Internet I decided on Visual Studio 2003, MSSQL Server 2000 Developer Edition, all running off Windowns XP Pro.

I cannot get the ASP to access the database, I keep getting the following message

System.Data.SqlClient.SqlException: Login failed for user 'MachineName\ASPNET'

I do not know what to do to sort this problem and I cannot test anything I have developed as a result. I am very desperate for help as I have been trying to sort this out for the last 5 days.

Somebody please please please help me!!!!!!!!!

Thank you if you can.

RW#1
install Connector/ODBC - MySQL ODBC driver
http://dev.mysql.com/downloads/

#2
check out Connector/ODBC Programmer's Reference Manual
http://www.mysql.com/search/?q=myodbc

#3
Here is my code to populate a datagrid from a mySQL database.

IN GLOBAL.ASAX
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'Create Database Connection String
Dim globalConnStr As String
globalConnStr = "driver={MySQL ODBC 3.51 Driver};"
globalConnStr = globalConnStr + "server=localhost;"
globalConnStr = globalConnStr + "port=3306;"
globalConnStr = globalConnStr + "Stmt=;"
globalConnStr = globalConnStr + "uid=root;"
globalConnStr = globalConnStr + "pwd=;"
globalConnStr = globalConnStr + "database=smfr_wildland;"
globalConnStr = globalConnStr + "Option=3;"

'Assign Database Connection String To
'global connection object
Application("globalConnStr") = globalConnStr
End Sub

in your code behind page that contains a datagrid...It should look KINDA like this.

Dim strSQL As New System.Text.StringBuilder
strSQL.Append("SELECT users.*,smfr_shifts.shift_name")
strSQL.Append(" FROM users")
strSQL.Append(" INNER JOIN smfr_shifts ON users.user_shift_id = smfr_shifts.shift_id")
strSQL.Append(" WHERE users.user_deploymentYN = " & x)
strSQL.Append(" ORDER BY users.user_deploymentYN DESC , users.user_sort;")

Dim DBConn As System.Data.Odbc.OdbcConnection
Dim DBCommand As System.Data.Odbc.OdbcDataAdapter

Dim DSPageData As New DataSet
DBConn = New System.Data.Odbc.OdbcConnection(Application.Item("globalConnStr"))
DBCommand = New System.Data.Odbc.OdbcDataAdapter(strSQL.ToString, DBConn)

DBCommand.Fill(DSPageData, "users")

dgTeam.DataSource = DSPageData.Tables("users").DefaultView

dgTeam.DataBind()

'Close and Clean-Up
DBConn.Close()
DBConn.Dispose()
DBConn = Nothing

DBCommand.Dispose()
DBCommand = Nothing

DSPageData.Dispose()
DSPageData.Clear()
DSPageData = Nothing

-------
NO System.Data.SqlClient
USE System.Data.Odbc

Hope this helps?

Tom|||Ralph,

If you are indeed using Microsoft SQL Server, then your code should be OK. You've posted in the MySQL section.

What you need to do is add the MACHINENAME\ASPNET user as a Login in your database, and give that user rights to the database objects it needs.

When an ASP.NET application trys to access your SQL Server database, it does so by using that account.

[now moved from MySQL forum to SQL Server forum]|||A few important remarks:
1. ASPNET will only work on W2K and Windows XP, not on Windows Server 2003 where the identity of the application pool will be used instead (network service account).
2. Even if yo'ure on W2K, the ASPNET user can be bypassed if you're using (Windows authentication with) impersonation or you've changed the processModel section; in that case, use that user account on SQL Server instead to give permissions to.
3. However, a big fat remark: if you grant ASPNET or NETWORK SERVICE rights to the database, every other service/application running in that identity's context will have rights on the database as well. On a hosted environment where others can upload code to the machine as well, this is a big big security leak since others can write code to mess up your database. If you still need to do this, consider to give the user only read rights on the database!
4. It would be better from this side of the picture to use SQL authentication instead, although the password is not encrypted then when it's sent to the server. This is a less "heavy" issue if SQL Server is running on the same box as the web server (definitely not a scalable solution, but still it's out there in many places) or when the server environment is heavy controlled (a switched network between the servers).
5. Another approach is to impersonate as a certain identity from within the code whenever you want to talk to the database and to undo that impersonation afterward, as shown on my blog intip 7.

In any case, try to lock down the number of users that can access the database as much as you can by creating separate users on the level of the database for each database (which has only rights on that database). Never ever connect in a lazy way (e.g. using a sysadmin user).|||I did not read the posting close enough...it was in the mySQL group when I read it and replied.

MONITOR...you may delete/remove my two post for this discussion...SORRY

Tom|||Put this into a text file called grantpermission.sql. Change the 'MachineName\ASPNET' to your computer name and change Use dbname to your database name. Then use SQL Query Analyzer and execute the code to add the user and grant permissions. ASPNET will become owner as you can see in the code. This assumes that you have everything installed correctly. I have the almost the exact same setup. Although I'm also using WebMatrix. SQL Desktop Edition on Win XP Pro.

-- Begin --
DECLARE @.username sysname
SELECT @.username = 'MachineName\ASPNET'

USE master
EXEC sp_grantlogin @.username

USE dbname
EXEC sp_grantdbaccess @.username
EXEC sp_addrolemember N'db_owner', @.username
-- End --

Help ! Error after (windows update) of .NET Framework

Hi all,
today i updated my .NET framework to 1.1 SP 1 (via windows update).
After than, my reporting services failed with the error key
"rsReportServerDisabled".
I have just a german full error message, but it is something with
"...decode symetric key ...". I use Win XP Professional as operating system.
Please apologize my english.
Thank your help in advance.
ThomasMost likely the ASP.NET account got reset. If you have the encryption key
saved, you can restore it using rskeymgmt. If not, you will need to reset
the encryption via rskeymgmt -d.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Thomas" <Thomas@.discussions.microsoft.com> wrote in message
news:D5EEE105-6F19-411C-A820-FBCE3940E699@.microsoft.com...
> Hi all,
> today i updated my .NET framework to 1.1 SP 1 (via windows update).
> After than, my reporting services failed with the error key
> "rsReportServerDisabled".
> I have just a german full error message, but it is something with
> "...decode symetric key ...". I use Win XP Professional as operating
> system.
> Please apologize my english.
> Thank your help in advance.
> Thomas
>
>|||I just tried it and you will probably also need to reconfigure the
connection string via rsconfig before you restore the encryption key.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:uCvrjDElEHA.3428@.TK2MSFTNGP14.phx.gbl...
> Most likely the ASP.NET account got reset. If you have the encryption key
> saved, you can restore it using rskeymgmt. If not, you will need to reset
> the encryption via rskeymgmt -d.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Thomas" <Thomas@.discussions.microsoft.com> wrote in message
> news:D5EEE105-6F19-411C-A820-FBCE3940E699@.microsoft.com...
>> Hi all,
>> today i updated my .NET framework to 1.1 SP 1 (via windows update).
>> After than, my reporting services failed with the error key
>> "rsReportServerDisabled".
>> I have just a german full error message, but it is something with
>> "...decode symetric key ...". I use Win XP Professional as operating
>> system.
>> Please apologize my english.
>> Thank your help in advance.
>> Thomas
>>
>>
>|||OK, one more correction. :) I was told by the developers that you won't need
to restore the encryption key. After resetting the connection string, you
just need to do an rsactivate -r -c and things will start working again.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:ePMQzNFlEHA.3452@.TK2MSFTNGP15.phx.gbl...
>I just tried it and you will probably also need to reconfigure the
>connection string via rsconfig before you restore the encryption key.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> news:uCvrjDElEHA.3428@.TK2MSFTNGP14.phx.gbl...
>> Most likely the ASP.NET account got reset. If you have the encryption key
>> saved, you can restore it using rskeymgmt. If not, you will need to reset
>> the encryption via rskeymgmt -d.
>> --
>> Brian Welcker
>> Group Program Manager
>> SQL Server Reporting Services
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Thomas" <Thomas@.discussions.microsoft.com> wrote in message
>> news:D5EEE105-6F19-411C-A820-FBCE3940E699@.microsoft.com...
>> Hi all,
>> today i updated my .NET framework to 1.1 SP 1 (via windows update).
>> After than, my reporting services failed with the error key
>> "rsReportServerDisabled".
>> I have just a german full error message, but it is something with
>> "...decode symetric key ...". I use Win XP Professional as operating
>> system.
>> Please apologize my english.
>> Thank your help in advance.
>> Thomas
>>
>>
>>
>|||Thank you Brian !
I will try it at once...
Best regards from Germany
Thomas
"Brian Welcker [MSFT]" wrote:
> OK, one more correction. :) I was told by the developers that you won't need
> to restore the encryption key. After resetting the connection string, you
> just need to do an rsactivate -r -c and things will start working again.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> news:ePMQzNFlEHA.3452@.TK2MSFTNGP15.phx.gbl...
> >I just tried it and you will probably also need to reconfigure the
> >connection string via rsconfig before you restore the encryption key.
> >
> > --
> > Brian Welcker
> > Group Program Manager
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
> > "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> > news:uCvrjDElEHA.3428@.TK2MSFTNGP14.phx.gbl...
> >> Most likely the ASP.NET account got reset. If you have the encryption key
> >> saved, you can restore it using rskeymgmt. If not, you will need to reset
> >> the encryption via rskeymgmt -d.
> >>
> >> --
> >> Brian Welcker
> >> Group Program Manager
> >> SQL Server Reporting Services
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >> "Thomas" <Thomas@.discussions.microsoft.com> wrote in message
> >> news:D5EEE105-6F19-411C-A820-FBCE3940E699@.microsoft.com...
> >> Hi all,
> >> today i updated my .NET framework to 1.1 SP 1 (via windows update).
> >> After than, my reporting services failed with the error key
> >> "rsReportServerDisabled".
> >> I have just a german full error message, but it is something with
> >> "...decode symetric key ...". I use Win XP Professional as operating
> >> system.
> >> Please apologize my english.
> >>
> >> Thank your help in advance.
> >> Thomas
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>

Friday, March 9, 2012

Help - Simple DataGrid Problem in Vis. Studio 2003

Hi,
As a relative newbie to SQL Server/ASP.NET I'm hoping someone here
can help with my problem. I'm developing a timesheet application in
ASP.NET C# using Visual Studio 2003 with a database built in MSDE.
One of my forms needs to return a simple list of resources from my
database. I have followed the guide on the MSDN libraries, but for
some reason I continuously get the same error message.
What I've done so far is Create the database, tables, and populate
with some sample data using using Server Explorer in Visual Studio. I
have
connected to the database (using integrated security) and I am
trying to get the contents of the Resource table to appear on my
form. I have then created a DataAdapter (tested the connection, set
the SQL as a simple SELECT * from Resource, etc), which also generates
an sqlConnection for me. To test this I have previewed the generated
data, and it returns what I want, so I
have chosen to generate a DataSet of this. I am then trying to get
this data into a simple DataGrid. On the properties of the DataGrid
I have changed the DataSource to point at my Dataset. As I
understand it, I then have to add the following to my Page Load
section of my code.
sqlConnection1.Open();
this.sqlDataAdapter1.Fill(this.dsResource);
sqlConnection1.Close();
The form builds fine, but when I browse to the particular form I get
the following error for the sqlConnection1.Open(); line
Exception Details: System.Data.SqlClient.SqlException: Cannot open
database requested in login 'SCMS'. Login fails. Login failed for
user 'AL-NOTEPAD\ASPNET'.
To me this is an error with my connection string. My database
instance is actually 'AL-NOTEPAD\VSDOTNET'. However the properties
for sqlConnection1 are pointing to the correct datasource. I do not
know why the application is looking for user 'AL-NOTEPAD\ASPNET'. It
does not exist, to my knowledge.
Any help with this would be greatly appreciated, as I get the same
error with my code for forms-based login...
Thanks in advance..thebison (alex.sinclair3@.btinternet.com) writes:
> The form builds fine, but when I browse to the particular form I get
> the following error for the sqlConnection1.Open(); line
> Exception Details: System.Data.SqlClient.SqlException: Cannot open
> database requested in login 'SCMS'. Login fails. Login failed for
> user 'AL-NOTEPAD\ASPNET'.
> To me this is an error with my connection string. My database
> instance is actually 'AL-NOTEPAD\VSDOTNET'. However the properties
> for sqlConnection1 are pointing to the correct datasource. I do not
> know why the application is looking for user 'AL-NOTEPAD\ASPNET'. It
> does not exist, to my knowledge.
I guess that's why the login fails. :-)
I believe this has to do with that IIS runs the in a context of a pre-
defined user, and IIS the tries to log in with integrated security,
but the ASPNET user have not been granted access to the database.
But you are probably better off asking in a newsgroup about ASP .Net.
At least I know very little about ASP .Net.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Monday, February 27, 2012

HELP - I NEED EXTRA MATRIX COLUMNS

I need to be able to add an extra column to my matrix - I've searched high and low on the net and I cant seem to find the answer anywhere.

I have grouped data which displays as it should and I can get the SubTotal part for my Dailys to run - I need to add a total for MTD and YTD (which is a part of the SQL Data) after the subtotal - is there a straight forward way of doing this?

This is an example of how I want my report to look (I can already achieve the bits highlighted bold)

Daily Data Commission (GroupData cell 1) Interest (GroupData CELL 2) GroupData etc … SUBTOTAL (DTD) MTD TOTAL YTD TOTAL Book Currency =sum(Fields!DTD.VALUE) ........ =sum(Fields!MTD.VALUE) =sum(Fields!YTD.VALUE)

and this is an example of the data being returned by my Sproc

Book CCY GroupedData DTD MTD YTD ABC GBP Commission £0.01 £0.09 -£0.10 ABC GBP Interest £0.02 £0.29 £0.11 ABC GBP Brokerage £0.12 £0.06 £0.20

When I use the "Add Column" functionality - I get a repeat of the MTD and YTD under each of the groupData cells - where as i only need it as a summary after the subtotal.

Daily Data Grouped Data CELL 1 Grouped Data CELL 2 Book Name Currency DTD TOTAL MTD TOTAL YTD TOTAL DTD TOTAL MTD TOTAL YTD TOTAL =sum(Fields!DTD.VALUE)

Does anyone out there know how to do it?

This SUCKS.... I cant believe no one knows this and there are no Microsoft developers monitoring this thread to answer the questions.

|||

Hi there,

Did you try doing subtotals and totals within SQL Server instead of in the matrix? This should get the extra columns you would need.

Alternatively you could create a matrix next to the matrix that may work.

Or see this posting.

http://www.sqlskills.com/blogs/liz/2006/07/21/ReportingServicesGettingTheMatrixToDisplayTwoSubtotalsForTheSameGroup.aspx

cheers,

Andrew

|||

Thanks Andrew -

For anyone who is reading this thread that isn't sure where the Inscope expression goes (like me) it is in the

"Data" bit of the matrix (where you have your =Sum(field!...) bit)

The only thing now is - how do I sort the positioning out. My design layout looks like below - I have a DTD BreakDown and Total (I have used the <position> element in the XML code behind to add "DTD Total" position to the front) - I can get the MTD to be on the same level as the DTD Parent Cell as needed - however The YTD subtotal is one level higher (I tried messing about with alignment - which sorts the problem temp - but on expanding the DTD breakdown the alignment doesnt work)

How can I make the YTD (Text) appear on the same level as DTD and MTD?

YTD DTD MTD Fields!DTDBreakDown DTD Total Field!Book.Value Field!CCY.Value iif(InScope("YTD"),
iif(InScope("MTD"),
Sum(Fields!AmountCCY_DTD.Value),
sum(Fields!AmountCCY_MTD.Value)),
sum(Fields!AmountCCY_YTD.Value))

e.g of how my report looks - I need the YTD to be on the same level as DTD and MTD

YTD (+)DTD MTD DTD Total Book 1 CCY 0 0 0

|||This is not possible in the Matrix report. You need to return you column from the SP or TSQL that you are using and instead of using Matrix create this report from using table report.|||

Are you sure? According to the example given in the URL on Andrew's Post(http://www.sqlskills.com/blogs/liz/2006/07/21/ReportingServicesGettingTheMatrixToDisplayTwoSubtotalsForTheSameGroup.aspx) says you can. However, its just doesn't explain how.

I need to use a matrix as the DTD breakdown is dynamic - and I'm almost there, the problem I have is cosmetic.

|||If you want to create the report as given in above URL then you can do it. Are you want to do like that ? and steps are clearly added there. Any other problem in that then let me know.

Help - how to open Report in new browser window?

Hello...
I am struggling with this...but I am getting close.
I am trying to use the Web Service programming interface from my ASP.Net
application. What I am trying to accomplish...is to allow the user to set
some report parameters (date ranges, zip codes, etc). When the user presses
the Run button on my ASP.Net page, I would like to render the report in a new
browser window/page, and with the Toolbar so the user could export to
whatever format that they want. Is this possible?
Thanks for any help...
- DW
The code I am using now is the following..
Dim rptIRIS As Byte() = Nothing
Dim rsIRIS As Secure_SQLRS.ReportingService = New
Secure_SQLRS.ReportingService
rsIRIS.Credentials = New System.Net.NetworkCredential("ME", "Pwd",
"Domain")
rsIRIS.PreAuthenticate = True
Dim rptPath As String = "/WebReports/UserLabels"
Dim rptFormat As String = "HTML4.0"
Dim rptViewerInfo As String = "<DeviceInfo>" & _
"<Toolbar>true</Toolbar>" & _
"<Parameters>false</Parameters>" & _
"<DocMap>true</DocMap>" & _
"<Zoom>100</Zoom>" & _
"</DeviceInfo>"
Dim rptParams(1) As Secure_SQLRS.ParameterValue
Dim paramValue As Secure_SQLRS.ParameterValue = New
Secure_SQLRS.ParameterValue
paramValue.Name = "ProductID"
paramValue.Value = "102"
rptParams(0) = paramValue
paramValue = New Secure_SQLRS.ParameterValue
paramValue.Name = "ZipCode"
paramValue.Value = "12345"
rptParams(1) = paramValue
Dim rptHistoryID As String = Nothing
Dim credentials() As Secure_SQLRS.DataSourceCredentials = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String
Dim mimeType As String
Dim warnings() As Secure_SQLRS.Warning = Nothing
Dim rptHistoryParams() As Secure_SQLRS.ParameterValue = Nothing
Dim streamIDs() As String = Nothing
Dim rptSessionHdr As Secure_SQLRS.SessionHeader = New
Secure_SQLRS.SessionHeader
rsIRIS.SessionHeaderValue = rptSessionHdr
Try
' execute the report
rptIRIS = rsIRIS.Render(rptPath, rptFormat, rptHistoryID,
rptViewerInfo, rptParams, credentials, _
showHideToggle, encoding, mimeType, rptHistoryParams,
warnings, streamIDs)
rptSessionHdr.SessionId = rsIRIS.SessionHeaderValue.SessionId
Response.Clear()
' set the http headers for the PDF response
HttpContext.Current.Response.ClearHeaders()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "text/html"
HttpContext.Current.Response.AppendHeader("Content-Disposition", _
"filename=""AddressLabels.HTM""")
' send the byte array containing the report as a binary response
HttpContext.Current.Response.BinaryWrite(rptIRIS)
HttpContext.Current.Response.End()
Catch ex As Exception
Finally
End TryYou won't be able to accomplish this with straight SOAP interfaces. You will
have to use a combination of Web service calls to list the reports in the
namespace and then a URL request to the server that includes the
parameterized URL for the report. You can certainly open it in a new browser
window under those conditions.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"dw" <dw@.discussions.microsoft.com> wrote in message
news:08CC0691-B2A2-4F4C-A1DA-7DAB23E67F20@.microsoft.com...
> Hello...
> I am struggling with this...but I am getting close.
> I am trying to use the Web Service programming interface from my ASP.Net
> application. What I am trying to accomplish...is to allow the user to set
> some report parameters (date ranges, zip codes, etc). When the user
presses
> the Run button on my ASP.Net page, I would like to render the report in a
new
> browser window/page, and with the Toolbar so the user could export to
> whatever format that they want. Is this possible?
> Thanks for any help...
> - DW
> The code I am using now is the following..
> Dim rptIRIS As Byte() = Nothing
> Dim rsIRIS As Secure_SQLRS.ReportingService = New
> Secure_SQLRS.ReportingService
> rsIRIS.Credentials = New System.Net.NetworkCredential("ME", "Pwd",
> "Domain")
> rsIRIS.PreAuthenticate = True
> Dim rptPath As String = "/WebReports/UserLabels"
> Dim rptFormat As String = "HTML4.0"
> Dim rptViewerInfo As String = "<DeviceInfo>" & _
> "<Toolbar>true</Toolbar>" & _
> "<Parameters>false</Parameters>" & _
> "<DocMap>true</DocMap>" & _
> "<Zoom>100</Zoom>" & _
> "</DeviceInfo>"
>
> Dim rptParams(1) As Secure_SQLRS.ParameterValue
> Dim paramValue As Secure_SQLRS.ParameterValue = New
> Secure_SQLRS.ParameterValue
> paramValue.Name = "ProductID"
> paramValue.Value = "102"
> rptParams(0) = paramValue
> paramValue = New Secure_SQLRS.ParameterValue
> paramValue.Name = "ZipCode"
> paramValue.Value = "12345"
> rptParams(1) = paramValue
> Dim rptHistoryID As String = Nothing
> Dim credentials() As Secure_SQLRS.DataSourceCredentials = Nothing
> Dim showHideToggle As String = Nothing
> Dim encoding As String
> Dim mimeType As String
> Dim warnings() As Secure_SQLRS.Warning = Nothing
> Dim rptHistoryParams() As Secure_SQLRS.ParameterValue = Nothing
> Dim streamIDs() As String = Nothing
> Dim rptSessionHdr As Secure_SQLRS.SessionHeader = New
> Secure_SQLRS.SessionHeader
> rsIRIS.SessionHeaderValue = rptSessionHdr
> Try
> ' execute the report
> rptIRIS = rsIRIS.Render(rptPath, rptFormat, rptHistoryID,
> rptViewerInfo, rptParams, credentials, _
> showHideToggle, encoding, mimeType, rptHistoryParams,
> warnings, streamIDs)
> rptSessionHdr.SessionId = rsIRIS.SessionHeaderValue.SessionId
> Response.Clear()
> ' set the http headers for the PDF response
> HttpContext.Current.Response.ClearHeaders()
> HttpContext.Current.Response.ClearContent()
> HttpContext.Current.Response.ContentType = "text/html"
> HttpContext.Current.Response.AppendHeader("Content-Disposition", _
> "filename=""AddressLabels.HTM""")
> ' send the byte array containing the report as a binary response
> HttpContext.Current.Response.BinaryWrite(rptIRIS)
> HttpContext.Current.Response.End()
> Catch ex As Exception
> Finally
> End Try

Help - Error: Unable to open the physical file

Hi, I've just finished creating my first ASP.NET website. I created it on my laptop and it works perfectly, but I'm having some problems deploying it to my web server (PC).
The site works ok, but when I try to log in to my client area, I get this error:

"Unable to open the physical file "c:\inetpub\wwwroot\ONeillStrata\App_Data\aspnetdb.mdf". Operating system error 5: "5(Access is denied.)".
An attempt to attach an auto-named database for file c:\inetpub\wwwroot\ONeillStrata\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

I've searched far and wide for a solution and have read many articles, but none seem to be able to fix my problem. I've tried using that SEUtil tool, but that didn't work, I've made sure the App_Data directory on the web server isn't read only (the read-only checkbox isn't ticked, but it DOES have that little green square which I can't get rid of), I've assigned the ASPNET user as a db owner and that didn't work and I've manually attached the database to the web server's instance of SQL Express 2005.
When I launch the solution in VS2005 on the web server, I can browse through the database and see the tables and data etc, but when I try to run the application, I get that message above...

Surely it shouldn't be this hard to get it going?
Any help would be massively appreciated.

Hi,

It seems that the physical file location of the aspnetdb.mdf is wrong.

Please open your IIS, right click on your default web site,and click on the properties, change to the ASP.NET tab, edit configurations.Then you can see the LocalSqlServer string listed there, change the string into the following:data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true.

Thanks.

HELP - Designing a Subscripion System for a Group of Reports

We're developing an ASP.NET 2.0 (C#) application that will act as a
front-end to SQL Server 2005 Reporting Services. We have an interesting
requirement that [we believe] can't be solved using RS out-of-the-box. So,
I'm writing today to get some ideas on possible solutions.
The requirement is that the app. needs to support, what we're calling, a
report group. A report group is simply a group of similar reports that can
be executed as a single unit (instead of having to execute each report
individually). This was not too bad to solve. We simply created our own
database tables that track which report group contains which reports.
The tricky part is that we now have to figure out a way to create a
subscription that executes the report group (thereby executing each
individual report in the report group automatically). Creating a
subscription for a single report is fairly straightforward, but it appears
this concept of a report group is not a part of RS.
Does anyone out there have any good ideas/suggestions on how we can
implement such functionality?
The best thought we have so far is to write another application that manages
the execution of each report in a report group. So, the SQL Server 2005 job
would call this additional little application, this additional app. would
lookup which reports are in the report group, and then it would loop through
all the reports and execute them one-by-one. But, this has some issues-like
how do we handle the output type (PDF, Excel, etc.) and how do we handle the
destination (e-mail, printer, etc.) of each report. Plus, it seems like we
would be somewhat reinventing the wheel as far as subscriptions go.
Thanks.Why aren't you using one master report with all the other reports as
sub-reports?
Tom Bizannes
oiduts wrote:
> We're developing an ASP.NET 2.0 (C#) application that will act as a
> front-end to SQL Server 2005 Reporting Services. We have an interesting
> requirement that [we believe] can't be solved using RS out-of-the-box. So,
> I'm writing today to get some ideas on possible solutions.
> The requirement is that the app. needs to support, what we're calling, a
> report group. A report group is simply a group of similar reports that can
> be executed as a single unit (instead of having to execute each report
> individually). This was not too bad to solve. We simply created our own
> database tables that track which report group contains which reports.
> The tricky part is that we now have to figure out a way to create a
> subscription that executes the report group (thereby executing each
> individual report in the report group automatically). Creating a
> subscription for a single report is fairly straightforward, but it appears
> this concept of a report group is not a part of RS.
> Does anyone out there have any good ideas/suggestions on how we can
> implement such functionality?
> The best thought we have so far is to write another application that manages
> the execution of each report in a report group. So, the SQL Server 2005 job
> would call this additional little application, this additional app. would
> lookup which reports are in the report group, and then it would loop through
> all the reports and execute them one-by-one. But, this has some issues-like
> how do we handle the output type (PDF, Excel, etc.) and how do we handle the
> destination (e-mail, printer, etc.) of each report. Plus, it seems like we
> would be somewhat reinventing the wheel as far as subscriptions go.
> Thanks.|||You could try setting up a shared schedule. It would still require
individual subscriptions for each report but they would all start
firing at the same scheduled time.

Friday, February 24, 2012

Help

I've just learned an asp.net 2.0 web app with vs 2005 and am using a SQL Server 2005. But after running programme the error occur.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

please help me! Fix it

Enable remote connections at the SQL Server. http://www.sqlserver2005.de/SharedFiles/remoteconnection.jpg

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

|||

I have finished the remote connection but my program not running. it still inform error:

Server Error in '/TipcGiaLai' Application.


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

Line 11: conPubs = New SqlConnection( "Server=localhost;UID=;PWD=;Database=Pubs" )

Line 12: cmdSelect = New SqlCommand( "Select * From Authors", conPubs )

Line 13: conPubs.Open()

Line 14: dtrAuthors = cmdSelect.ExecuteReader()

Line 15:

please help me ! Thanks