Data Access, DataReaders, DataSets, Web Pages And Controls

May 10, 2007

I have a question about loading data on the page lode event. The question is more conceptual then how to.
 
Using C#, I would like to make a call to a SQL 2000 Server, with the use of a stored procedure return one row with eleven fields. Then use the data to fill five different controls. There is no manipulation of the data it is just presented as information. With a DataReader and the GetValues method using the resultant array I can fill the controls (or can I), or with a DataSet and the Load method do the same thing. Now this code can be placed in the code behind page or it can be implemented in a class. This is the only page that uses this combination of fields and controls; however I would think a more generic call to the data could be made then pick and chose the fields as needed. What process makes the most sense? Is what I just described even possible (as yet I haven’t tried it)?
 
As always thanks in advance for any thoughts, comments, and suggestions.

View 1 Replies


ADVERTISEMENT

Do Drag And Drop Controls Create DataSets

Nov 27, 2006

When I drag a GridView from the toolbox onto a Webform, and then configure its DataSource is a true DataSet created that I can access in the code behind?  When my results return I want to be able to access individual rows and cells, taking their values, assiging them to variables and then using the newly equated variable to perform calculations.    
 Thank you,

View 1 Replies View Related

I Am Accessing Data Using Data Access Pages In IIS 7 To SQL Server 2005 Authentication Is Failing

Feb 5, 2007

is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.

I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?

I expect to set up a username for each database as i setup new customers.

View 1 Replies View Related

Data Access Pages And SQL-Server

Jul 20, 2005

Dear All,I have developed a Data Access Page with Access as a project. It isconnected to a SQL-Server database. I try to edit the data in the table andam not able to do so. I might be missing some permissions. I have changeda number. What am I missing?Thanks in advance.Jeff Magouirk

View 1 Replies View Related

Porting VB 6 Data Controls To Use SqlDatasource Controls - Please Help!!!!

May 9, 2007

Hi,  I am porting a massive VB6 project to ASP.net 2005.  Most of the code is fine, however because the original developers used lots of data controls and my own time restrictions I thought to replicate the functionality by using Sqldatasource controls instead. 
 These data controls are bound to DBtruegrids.   The project has has lots of code like...
 AdodcOrders.Recordset.RecordCount > 0 or  If AdodcOrders.Recordset.EOF  or  AdodcOrders.Recordset.MoveNext()  or
AdodcDetail.Recordset!FieldName
The problem is the sqldatasource control doesn't have a recordset/dataset property which I can access and manipulate, or does it?  What should I do to get round these?  The project has thousands of lines like this in so its not feasible to rewrite it (although if I could I would!).
 Any suggestions please gratefully appreciated.
many thanks
mike

View 1 Replies View Related

Why Clean Data Pages Written To L2 Cache To Make Space For Other Not Modified Pages

Oct 2, 2014

in microsoft doc there is written on the topic of BP Extensions with SSD's in SQL Server 2014: only clean pages are written to disk... does this mean data pages that have not been modified yet? or also those data pages that have already been modified, and where log has finished writing and the transaction has been marked as commited??

why are there clean data pages being written to L2 cache to make space for other not modified pages? I mean, shoudnt they be modified first, before letting other unmodified data pages into the Cache? I mean they have still to be modified..that makes no sense to me to page them out and page them in again just for other data pages...

View 2 Replies View Related

Cannot Access SQL Server When Using Controls Graphically

Nov 3, 2006

Hi, i wrote a simple program to access a SQL Server 2005 DB and i use the following connection string: <connectionStrings>
    <add name="Alunos" connectionString="Data Source=.;Initial Catalog=ALUNOS;integrated security=true"/>
    <add name="Escola" connectionString="Data
Source=.SQLEXPRESS;Initial Catalog=Escola;integrated
security=true"/>
  </connectionStrings>   It all works fine.Then 
i try to create a SQLDataSource object graphically and configure it.
when i choosethe instance and DBi choose Test Connection and it gives
the 'Named Pipes Provider , error 40'. I think i solves this problem
because i googled thisand found a lot of info and i did all that.But
the problem remains.Could it be the a security issue? with the user i´m using to access the DB?Some help on this would be very appreciated.ThanksSP 

View 2 Replies View Related

Use ReportViewer Controls || URL Access || Web Services...???

Jan 30, 2007

Hi,

I need to implement SQL server 2005 reporting services in my current project, we will be having a report server for that, now i am really confused ho should I integrate reporting services with my asp.net 2.0 web application.

My requirement consists of using tables, charts and graphs, need to save reports as excel, xml and csv formats and most important thing is report columns are dynamic, user can select/deselect some columns in a particular report.

Can any one help whether i should go for reportviewer in remote processing mode(then how can i pass column information) or should i go for url access or use SOAP API.

URL access looks easy to implement and really bowled out by SOAP API option, and dont know whether reportviewer can fulfill my requirements or not.

Will really appreciate any kind of help....

View 1 Replies View Related

How Do I Get ONE Table Trying To Access TWO Datasets/Dataset Fields

Oct 26, 2007

Hi

I'm all very new to SQL Reporting Services so I am hoping that someone will be able to help me.

I have two datsets. Both contain the same array of information pertaining to a particular site. For example, how much sales we had, how much revenue was made, how much commission was created at the end of each day, the usual kind of metrics. We have a stored procedure which takes a final total and puts into a table we can access by date.

I want to produce a report that can compare the data from two dates. I use two datasets to run the quries that will return the relevant data. The only thing that differs between the dataset is the date that the data is based on. So to say first dataset will have data on one date and the second dataset will have data on a another date.

I was trying to make a table where I could include fields from both datasets, mainly for making comparison easier.

so id have

columns
online hits (dateone) | online hits (datetwo)
Rows
Data date1 | Data date2

and so on.

in fact i had this as the data from the first dataset in an example field:
=Fields!OnlineSales.Value

but i couldnt get the second dataset to work even if i tried entering :
=(Fields!OfflineBookings.Value, "SecondDatePicker")

I can't get the table to include field results from the second dataset as a table can only be linked to one dataset.

How can I get round this little problem?

View 1 Replies View Related

Not Sure How To Do This Without 2 Datareaders, Which Isn't Allowed...

Feb 6, 2008

I have a sql select statement, then I have a datareader and I'm trying to loop through that reader and insert a record into another table each time until there are no more records in the loop. I'm not sure how to do this though without using 2 datareaders. Please help. Thanks
 1 ' Retrieve Data from database based on selections chosen in ListBox
2 Dim cmdCommittee As New SqlCommand("Select * from committees_tbl where committee_id in" & _
3 "(" & strCommitteesRemoveLast & ") order by committee_name", conn_Insert)
4
5 ' setup a datareader
6 Dim drCommittee As SqlDataReader = cmdCommittee.ExecuteReader()
7
8
9 ' Loop through datareader and insert rows
10 ' into the xref_person_committees_tbl
11 While drCommittee.Read()
12 Dim strCommitteeName As String = drCommittee("committee_name") 'retrieve committee_name from datareader
13
14 ' Create a sql string
15 Dim strAddCommittee As String = String.Empty
16 strAddCommittee = "Insert into xref_person_committees_tbl (committee_name) values ('" & strCommitteeName & "')"
17 'Response.Write(strAddCommittee & "<br>")
18
19 ' Create a sql command to process the insert
20 Dim sqlAddCommittee As New SqlCommand(strAddCommittee, conn_Insert)
21 Dim drNewCommittee As SqlDataReader = sqlAddCommittee.ExecuteReader()
22
23
24
25
26 End While
27 ' -----------------------------------------------------------------------------------
28
29 drCommittee.Close()
 

View 5 Replies View Related

Design Help – Access SQL Database Behind A Firewall From ASP .NET Pages.

Feb 26, 2004

Hi,

I am new to internet development and would like some advice on the technology used to access a SQL database that sits on a network behind a firewall.

** ASP .NET Page ** -> ** Web Server ** -> ** FIREWALL ** -> ** SQL **

So to give an example; from an ASP .NET page on the internet, I would like to populate a DataGrid with the contents of a single table from a SQL database. The SQL database is sitting on our company network behind a firewall.

Could someone please explain / point me in the right direction in how the ASP .NET page / Web Server can securely access the SQL database.

Thanking you in advance
Scott

View 2 Replies View Related

MS Access- TOP / Offset? I Need To Order Results As Pages

Feb 18, 2005

Hi,

Sorry I have to post this here, but its sort of related to MS SQL anyway

I'm running a PHP system with MS Access. I need to order results in pages. (For those who are familiar with MySqL and Postgresql - I need the equivalent to LIMIT/OFFSET in MS Access).

I know I can "SELECT TOP 50" in my sql - so that solves the number of results per page.
But what about page 2,3,4..etc.... how do I select results from an offset?

There doesnt seem to be a solution for it

Thanks!

View 2 Replies View Related

Problem With Connections, Commands, And DataReaders

Apr 28, 2007

Thanks for taking a look at this.  Could you tell me where I've gone wrong?
I'm migrating data (2 fields) from one table to another via a loop and two SProcs, InfoGet & InfoSet.   objCmdGet is the SqlCommand object for the Get.  objCmdSet is the SqlCommand object for the Set.  drGet and drSet are the data readers.
My first pass succeeds.  On the second pass, an exception is thrown: "Procedure or function InfoSet has too many arguments specified."
Maybe drSet isn't closing, even though I explicitly do so at the bottom of the loop?1 ' Earlier defined: 2 Connection and 2 Command objects.
2 Dim drGet As SqlDataReader
3 Dim drSet As SqlDataReader
4
5 Try
6 objConnGet.Open()
7 drGet = objCmd1.ExecuteReader(CommandBehavior.CloseConnection)
8
9 While (drGet.Read())
10 _title = dr("usertitle")
11 _phone = dr("phoneoffice")
12
13 objCmdSet.Parameters.Add("@usertitle", SqlDbType.NVarChar, 50).Value = _title
14 objCmdSet.Parameters.Add("@userphone", SqlDbType.NVarChar, 50).Value = _phone
15
16 objConnSet.Open()
17 drSet = objCmdSet.ExecuteReader(CommandBehavior.CloseConnection)
18 drSet.Close()
19 End While
20 Catch eX As Exception
21
22 Finally
23 drGet.Close()
24 End Try

View 2 Replies View Related

Data Mining Web Controls

May 13, 2007

Hi ... hope you can help.

I would like to use the Data Mining Web Controls which ship with the MSSQL2005 Beta 2. The installer (BetaAnalysisServicesSamples.MSI) is supposed to create a new virtual directory and should also create the DataMiningHTMLViewers.dll according to "ReadMe_Data_Mining_Web_Controls.rtf"

But the MSI only creates a few new directories with the source code and a deployment project (DMHTMLViewersSetup.vdproj) which won't open with VS2003. The solution apears to be for VS2005.

How do I install the Web Controls?

View 3 Replies View Related

Login Issue When Aspx Pages On IIS Attempt To Access Msde

Jan 27, 2005

I am new to asp.net programing and am trying to put a basic secured login page on out IIS server to test, etc... Using the wbe matrix tool I was able to sucessfully login, and access avrious database tables without a problem, however on the IIS box I receive the following error when i attempt to access pages that use the database.

Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYNETWORK SERVICE'.

Source Error:


Line 48:
Line 49: Dim ds As New DataSet()
Line 50: myCommand.Fill(ds)
Line 51:
Line 52: MasterGrid.DataSource = ds


Source File: C:InetpubwwwrootaspDefault.aspx Line: 50

Stack Trace:


[SqlException: Login failed for user 'NT AUTHORITYNETWORK SERVICE'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
ASP.Default_aspx.BindMasterGrid() in C:InetpubwwwrootaspDefault.aspx:50
ASP.Default_aspx.Page_Load(Object Sender, EventArgs E) in C:InetpubwwwrootaspDefault.aspx:14
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

All asp & aspx pages that do not reference a database work fine. I have ready many articles about simialr problems, and it appears that I either need to cerate a aspnet user or add the nt authority as a database user. Can someone point me in the irght direction, and how to get this working?

Thanks much!

View 1 Replies View Related

Multiple Data Controls In Gridview

Nov 28, 2007

one of my webpages uses the following sql query to allow the user to search through the database and present the qualifying data in gridview:
 SELECT * FROM [Table1] WHERE ([comments] LIKE '%' + ? + '%')
how could i expand this so that the user can also search through the database but instead by searching through another column such as [type]?
thanks in advance

View 11 Replies View Related

Data Mining Viewer Controls.....

Apr 16, 2007

i'd like to add the data mining viewer controls into visual c# 's toolkit....is it possible...

is there a way how i could create forms and import the minned pattern into these forms using the data mining viewer controls??

View 1 Replies View Related

Installing Data Mining Web Controls

Aug 8, 2006

Hello,

I have SQL 2005 and Visual Studio 2005 and I´m trying to install the Data Mining Web Controls. I downloaded the SQL Samples and I´m following the instructions of the "ReadMe_Data_Mining_Web_Controls.htm" file, but when I try to install de data mining web controls the setup.exe does´nt create the folder "C:Program FilesMicrosoft.AnalysisServices.DataMiningHtmlViewers " and the folder "C:Inetpubwwwrootaspnet_clientmicrosoft_analysisservices_datamininghtmlviewers ".

Then, I don´t have the file "C:Program FilesMicrosoft.AnalysisServices.DataMiningHtmlViewersMicrosoft.AnalysisServices.DataMiningHTMLViewers.dll " for using the web controls.

Can somebody help me?

Dunia





View 22 Replies View Related

Need Urgent Help In Data Mining Web Controls. Please.

Jan 4, 2008

My problem is about using Data mining web controls in asp.net 2005. My SQL Server 2005 is not SP2. My problem is whenever i want to use desicion tree viewer in aspx page it gives me an error : "Error: Error (Data mining): The specified DMX column was not found in the context at line 1, column 69". I have populated database,model,tree,server properties in design time and connection property ( An oledb connection) by code-behind with that connection string :

Provider=MSOLAP.3;Data Source=localhost;Integrated Security=SSPI;Initial Catalog=ADV

I'm very sad because this module is very important for my homework. Please help me.

View 5 Replies View Related

Trying To Insert Form Controls And Another Data Source

Mar 24, 2007

I'm trying to insert data into a table from two sources (a table and form controls) at the same time.   
--this data from the tradeitem table and is inserted into the selections table
--based on the variable @builderid --no problem it works fine as is
INSERT INTO Selections ([TradeItemID], [TradeID], [ProductName], [OrigSalesPrice], [RevSalesPrice])
SELECT [TradeItemID], [TradeID], [TradeItem], [Price], [Price]
FROM tradeitems
WHERE BuilderID = '1'
However, I need these also to pull from the form controls
--These variables will pull from form controls and need to be associated
--with each record added to the seleciton table
INSERT INTO Selections ([UserDataID] = '1', [DefaultQty] = '0')
--How do I get these combined into one statement so I get the following result?












TradeItemID
TradeID
ProductName
OrigSalesPrice
RevSalesPrice
UserDataID
DefaultQty

1
72
HVAC
50
50
1
0

2
36
Plumbing
100
100
1
0

3
99
Electrical
100
100
1
0

4
4
Pain
25
25
1
0
Thanks in advance

View 2 Replies View Related

Extract Data And Populate Values Into The Respective Controls

Apr 16, 2008

Hi!

I am creating a scheduling web application. I have managed to insert data into the database. The code is as follow:

Dim insertSQLDatasource As New SqlDataSource()
insertSQLDatasource.ConnectionString = ConfigurationManager.ConnectionStrings("ScheduleConnectionString").ToString

insertSQLDatasource.InsertCommandType = SqlDataSourceCommandType.Text
insertSQLDatasource.InsertCommand = "INSERT INTO Demo_Theatre_DB (StartTime, EndTime, CompanyName, Purpose, AccountManager, Presenter, ColorCode, Status, Comments) VALUES (@StartTime, @EndTime, @CompanyName, @Purpose, @AccountManager, @Presenter, @ColorCode, @Status, @Comments)"

insertSQLDatasource.InsertParameters.Add("StartTime", StartTimeTextBox.Text)
insertSQLDatasource.InsertParameters.Add("EndTime", EndTimeTextBox.Text)
insertSQLDatasource.InsertParameters.Add("CompanyName", CompanyNameTextBox.Text)
insertSQLDatasource.InsertParameters.Add("Purpose", PurposeTextBox.Text)
insertSQLDatasource.InsertParameters.Add("AccountManager", AccountManagerTextBox.Text)
insertSQLDatasource.InsertParameters.Add("Presenter", PresenterTextBox.Text)
insertSQLDatasource.InsertParameters.Add("ColorCode", ColorDDL.SelectedValue.ToString)
insertSQLDatasource.InsertParameters.Add("Status", StatusRadioButtonList.SelectedValue)
insertSQLDatasource.InsertParameters.Add("Comments", CommentTextBox.Text)

Try
insertSQLDatasource.Insert()
Catch ex As Exception
Panel1.Visible = True
InsertMsgLabel.Text = ex.Message.ToString
Finally
insertSQLDatasource = Nothing
End Try

Now I am trying to select the values for a particular event. For example, if the user selects an event with id 40, the values that corresponds to that row will be read and filled into the respective controls. I tried the following code, but doesn't work.

Dim sqlConn As SqlConnection = New SqlConnection("ScheduleConnectionString")
Dim com As SqlCommand = New SqlCommand("SELECT * FROM Demo_Theatre_DB WHERE ID=@ID", sqlConn)
sqlConn.Open()
Dim r As SqlDataReader = com.ExecuteReader()
While r.Read()
StartTimeTextBox.Text = r("StartTime")
EndTimeTextBox.Text = r("EndTime")
CompanyNameTextBox.Text = r("CompanyName")
PurposeTextBox.Text = r("Purpose")
AccountManagerTextBox.Text = r("AccountManager")
PresenterTextBox.Text = r("Presenter")
ColorDDL.SelectedValue = r("ColorCode")
StatusRadioButtonList.SelectedValue = r("Status")
CommentTextBox.Text = r("Comments")
End While

I hope someone can help me with this.

Your help will be appreciated.

Thanks!

View 8 Replies View Related

Address Windowing Extensions (AWE) Requires The 'lock Pages In Memory' Privilege Which Is Not Currently Present In The Access To

Feb 6, 2008

I've read all the posts... set the security policy (for the service account running SQL Server) to lock pages in memory... ran gpupdate... still same error... HELP !!!!

View 1 Replies View Related

Problem Inserting Data Into SQL Server 2005 DB From WebForm Controls

Mar 30, 2007

Hello all,
I am having problems running a stored proc from an aspx.cs file. Basically I want to extract data from webForm controls and create a new record in a DB table. I have watched the "Getting Started" videos on thi site, and the only difference between my code and the code of the demonstrator is the connection string.   My conn string:- dataSrc.ConnectionString = ConfigurationManager.ConnectionStrings["ProjectTblConnString"].ConnectionString;Demonstrator conn string:- dataSrc.ConnectionString = ConfigurationManager.ConnectionStrings("ProjectTblConnString");When I debug with the string as shown by the demonstrator the error list reports that ConnectionStrings is a property and I am trying to use it as a mothod, which is fair enough, but I am just confused as how it worked for the demonstrator and not myself. When I debug with the code I used above I get no error, but nothing is inserted in the DB.Also, it looks as if the only class in my aspx.cs file that is actually being executed is PageLoad() - the remainder of the code seems to be ignored. Below is the entired aspx.cs file:- 1 using System;
2 using System.Data;
3 using System.Configuration;
4 using System.Collections;
5 using System.Web;
6 using System.Web.Security;
7 using System.Web.UI;
8 using System.Web.UI.WebControls;
9 using System.Web.UI.WebControls.WebParts;
10 using System.Web.UI.HtmlControls;
11
12 public partial class CreateProject : System.Web.UI.Page
13 {
14 protected void Page_Load(object sender, EventArgs e)
15 {
16
17 if (User.Identity.IsAuthenticated == false)
18 {
19 Server.Transfer("Default.aspx");
20 }
21
22 if (chkbox_startDate.Checked == true)
23 {
24 txtbox_startDate.ReadOnly = true;
25 txtbox_startDate.Text = (System.DateTime.Now.ToString());
26 }
27
28 }
29
30 protected void btn_create_Click(object sender, EventArgs e)
31 {
32 //connection string for connecting to SQL Server DB
33 SqlDataSource dataSrc = new SqlDataSource();
34 dataSrc.ConnectionString = ConfigurationManager.ConnectionStrings["ProjectTblConnString"].ConnectionString;
35
36
37 //insert data in table using the CreateNewProject stored proc in the DB
38 dataSrc.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
39 dataSrc.InsertCommand = "CreateNewProject";
40 dataSrc.InsertParameters.Add("Project_Title", txtbox_title.ToString() );
41 dataSrc.InsertParameters.Add("Description", txtbox_desc.ToString() );
42 dataSrc.InsertParameters.Add("Start_Date", txtbox_startDate.ToString() );
43 dataSrc.InsertParameters.Add("Primary_Dev_Lang", list_devLang.ToString() );
44 dataSrc.InsertParameters.Add("Dev_Environment", list_devEnv.ToString() );
45 dataSrc.InsertParameters.Add("No_Junior_Devs", txtbox_juniorDevs.ToString() );
46 dataSrc.InsertParameters.Add("No_Senior_Devs", txtbox_seniorDevs.ToString() );
47
48 int rowsAffected = 0;
49 try
50 {
51 rowsAffected = dataSrc.Insert();
52 }
53 catch (Exception ex)
54 {
55 Server.Transfer(Error.aspx);
56 }
57 finally
58 {
59 dataSrc = null;
60 }
61
62 if (rowsAffected != 1)
63 {
64 label_confirm.Text = "Error, Contact system admin";
65 }
66 else
67 {
68 label_confirm.Text = "Success";
69 }
70
71 }//end btn_create
72
73 //if cancel is clicked set all values back to default
74 protected void btn_cancel_Click(object sender, EventArgs e)
75 {
76 txtbox_title.Text = "";
77 txtbox_desc.Text = "";
78 txtbox_startDate.Text = "";
79 txtbox_seniorDevs.Text = "";
80 txtbox_juniorDevs.Text = "";
81 list_devEnv.SelectedIndex = 0;
82 list_devLang.SelectedIndex = 0;
83 chkbox_startDate.Checked = true;
84 label_confirm.Text = "";
85 }
86
87 //if checked the current dateTime is inserted into txtbox
88 protected void chkbox_startDate_CheckedChanged(object sender, EventArgs e)
89 {
90 if (chkbox_startDate.Checked == true)
91 {
92 txtbox_startDate.ReadOnly = true;
93 txtbox_startDate.Text = (System.DateTime.Now.ToString());
94 }
95 else
96 {
97 txtbox_startDate.ReadOnly = false;
98 txtbox_startDate.Text = "";
99 }
100 }//end chkox
101
102
103 }//end class
 
Any help anyome can give is greatly appreciated. This is part of my Final Year College Dissertation which is due in 3wks !!!!
Sláinte á chaire,
Seán
 

View 2 Replies View Related

Error With Data Mining Viewer Controls In Visual Studio 2008

Nov 20, 2007

Hello:

I have a framework 2.0 winforms application that uses the data mining viewer controls. I upgraded the project to visual studio 2008 and compiled it under framework 2.0. It compiles fine, but when the form with the TimeSeriesViewer control loads, the application throws the following exception:

System.Reflection.TargetInvocationException was unhandled by user code
Message="Unable to get the window handle for the 'AxChartSpace' control. Windowless ActiveX controls are not supported."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.AxHost.InPlaceActivate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at Microsoft.AnalysisServices.Viewers.TimeSeriesViewer.InitializeComponent()
at Microsoft.AnalysisServices.Viewers.TimeSeriesViewer..ctor()
at RMS2.UI.DecisionSupport.ShowModel(String modelName, Int32 tabIndex) in C:UsersDougDocumentsRmsIIRmsIIRMS2.UIDecisionSupport.cs:line 72
at RMS2.UI.DecisionSupport.DecisionSupport_Load(Object sender, EventArgs e) in C:UsersDougDocumentsRmsIIRmsIIRMS2.UIDecisionSupport.cs:line 42
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException: System.AccessViolationException
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb(Int32 iVerb, IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr hwndParent, COMRECT lprcPosRect)
at System.Windows.Forms.AxHost.DoVerb(Int32 verb)
at System.Windows.Forms.AxHost.InPlaceActivate()
InnerException:


The control is being added programatically, as in the wiinforms samples. Can anyone suggest a workaround? Thank you in advance.

- doug

View 5 Replies View Related

Data From 2 Datasets In One Table

Apr 24, 2007

i have 2 datasets in my report.



dataset1 brings back:

date shirts pants

4/1 3 5

4/2 4 6

4/3 2 9



dataset2 brings back:

date shoes boots

4/1 7 4

4/2 3 2

4/3 9 8



i want to to have a report that shows:

date shirts pants shoes boots

4/1 3 5 7 4

4/2 4 6 3 2

4/3 2 9 9 8



when i added a table in the layout tab, and drag in fields from the 2 datasets, for the dataset1, i would get fields like "=Fields!shirts.Value". but, when i drag in fields from dataset2, it shows up like "=Sum(Fields!shoes.Value, "dataset1")".



i don't want the sum, i just want the value. when i take out the "sum" part of the field expression, i get an error that says:

[rsFieldReference] The Value expression for the textbox €˜shoes_1€™ refers to the field €˜shoes€™. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.


any advice?



thank you much :-)

View 7 Replies View Related

Crossjoining Data From 2 Datasets

Mar 7, 2007

Hi,

I have one dataset DS1 connected to one SQL 2005 server DB, another dataset DS2 to different server on different physical machine, different SQL 2005 DB. I'm trying to build only one chart which data is based on those two different datasets DS1 and DS2. I understand that I can use subreports to use two different datasets, but how can I crossjoin those data together in one chart?



Thanks!

View 4 Replies View Related

Index And Data Pages

Jul 20, 2005

I am trying to understand how the data in sql server is stored andalso regarding fill factor and page splitting.1) My first question what is the difference between Index pages andData pages.and how are they different for clustered and non clustered indexes andheap tables.2) What is the relation between index and data pages.2) BOL says that fill factor is used to define the amount of freespace on each page of index. I am confused here what does index pagesand data pages containfor clustered/non clustered/heap tables.3) Why does page splits occur and do they occur due to the lack ofspace in index or data pages?Thanksskura

View 2 Replies View Related

Problem Updating Data While Using Datasets And Sqldatasource

Apr 3, 2008

 




hello.i'm having the following problem.in one page i have a dataset created at runtime along side with sqldataadapter and an sqlconnection.i'm using a dataset here since i'm working with heirarchical tables.when i click on child table [in a spcific column] it opens up a new aspx page with an editing form [formview in edit mode]when
i press the update button it claims to update the data, but when i
close the form and reopen it from the same column it opens the form
again, but with the old data, and the new data doesn't get updated
until i close the openinig aspx page [the one with the table]
refreshing it doesn't work, nor does creating a postback.anyone has any ideas ?

View 2 Replies View Related

Change Data Source For Mutiple Datasets At Once

Jun 4, 2007



Hi All,



In the BI development studio when I have to change the data source for data sets within a report, I have to go to each of the datasets individually to do this. Is there a quicker way to do this. Say I want to change data source for the entire report in BI dev studio.



thanks



Sonny

View 3 Replies View Related

Reorganize Data And Index Pages

Jul 23, 2005

Hello all,SQL 2000 on Windows 2000. If I go into all tasks, maintenance plan, itgives me an option to reorganize data and index pages. When I check onit, it populates the line "change free space per page percentage to" andputs in 10 in there. Is this the default for free space? Is it thedata pages that will have 10% free space or just the index pages? Aredata and index on the same pages?Thanks,Raziq.*** Sent via Developersdex http://www.developersdex.com ***

View 1 Replies View Related

Reporting Services :: Accessing Data From 2 Datasets In A Tablix?

Aug 26, 2015

I have to create tablix report using data from 2 datasets. The data source for one of the dataset, DataSet1 is Microsoft SQL Server and the data source for the other dataset, DataSet2 is Excel.

I have to pic 3 columns from DataSet1 and one column from DataSet2.

I tried using a lookup function Expression:

=Lookup(Fields!ProgrammerName.Value,Fields!ProgrammerName.Value,Fields!Skill.Value, "DataSet2")

The above expression is throwing #Error on that column in the output.what should I do?

View 5 Replies View Related

SQL 2012 :: How To Keep IAM Page Track Of Data Pages

Sep 15, 2014

I in a table or partition, the first page is an IAM-Page if I'm not wrong, this page keeps track of the extents.
In the first extent to where the "first_iam_page" points to, the extent is a mixed extent, therefore the pages can be from different tables or partitions, correct? How does my IAM-Page map the right pages to the corresponding table? the following extents are all uniform of one table type, so I guess it doesnt matter then. But n, how does it keep track of which pages belong to which tables in the first extent?

My second question is, the first IAM-Page is obviously an IAM-Page, but there are also GAM , SGAM and PFS Page files... where are they stored? Because when I create a table and insert a big value(8000) into it, it reserves 16KB for that table, one for the IAM-page, and one for the first data-page. But where can I find the GAM,SGAM and PFS page files? or are they not page files, just some other structures?

View 9 Replies View Related

Heap Table: Why 454 Rows Of Two INT Columns Use 2 Data Pages?

Mar 2, 2007

IF (SELECT OBJECT_ID('t1')) IS NOT NULLDROP TABLE t1GOCREATE TABLE t1 (c1 INT, c2 INT)DECLARE @n INTSET @n = 1WHILE @n <= 454BEGININSERT INTO t1 VALUES (@n, @n)SET @n = @n + 1ENDSELECT name, indid, CASE indidWHEN 0 THEN 'Table'WHEN 1 THEN 'Clustered Index'ELSE 'Nonclustered Index'END AS Type,dpages, rowcntFROM sysindexesWHERE id = OBJECT_ID('T1')name indid Type dpages rowcnt---- ----- ---- ------ ------NULL 0 Table 2 454I have a table containing 454 rows of two columnsof type INT with each being 4 bytesc1 int = 4 bytes+c2 int = 4 bytes=8 bytes per rowIf I entered 454 rows : 454 * 8 = 3,632 byteseach SQL Page is 8KB = 8 * 1024 bytes= 8,192 bytesa data page header takes the first 96 bytesleaving 8096 bytes for data and row offsets.Each record uses a row offset at the end of the pageconsisting of 2 bytes. 454 * 2 = 908 bytes.8096 - 3632 - 908 = 3,556 bytes. Should this befree data bytes?For a heap table, does SQL add an internal uniqueidentifiercolumn also? or my question is when does SQL adda uniqueidentifier? I am reading Inside SQL 2000 andtrying to understand a few things.A uniqueidentifier of 4 bytes gets added when a clustered indexexists but it is NOT a UNIQUE clustered index. AND onlyif duplicate record is added those two records only geta uniqueidentifier value.But in my example it's a heap table with no indexes. Evenon a heap table with no indexes a ROWID or Uniqueidentifierget added? Based on the INSERT statement above allvalues are unique.So what am I missing to understand why 453 rowsmake one data page to be used whereas 454 rowsmake two data pages to be used?Thank you

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved