Search Results

Search found 1402 results on 57 pages for 'dataset'.

Page 42/57 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Property in a Windows Forms form class only accessable after Load event

    - by Spooky2010
    I'm instantiating and calling Form B from Form A. FormB has some custom properties, to allow me to pass it things like sqlAdaptors and dataset instances. When i instantiate and show Form B from Form A as a dialog form with a Using statement, it all works fine, but i find the properties i pass are not available in Form B until after the form_load event has fired. I was under the impression the properties when passed to a instantiated class should be available from a constructor, but this is not the case. If it try to access the properties before the form load event i get a null reference exception. Is this correct behavior ?

    Read the article

  • How to ask database server for current datetime using entity framework?

    - by Levelbit
    I don't want for my current ModifeidDateTime to be machine time already server time. Every time I want to update or add a person to my datebase on SQL Server 2008 I want to fill ModifiedDateTime filed. It's not like I can change update query as with data adapter command when I work with dataset and to define for my ModifiedDateTime filed to be =GetDate(). I created stored function to retutn me a value of GetDate() method, but I have a problem to import procedure which returns values as int, string ... or no value at all, already just entity values as Person for example in my case. Why is that? Anyway, It would be of great help if you can provide me any solution that works to retrieve DateTime value from server.

    Read the article

  • CorePlot - Set y-Axis range to include all data points

    - by zdestiny
    I have implemented a CorePlot graph in my iOS application, however I am unable to dynamically size the y-Axis based on the data points in the set. Some datasets range from 10-50, while others would range from 400-500. In both cases, I would like to have y-origin (0) visible. I have tried using the scaletofitplots method: [graph.defaultPlotSpace scaleToFitPlots:[graph allPlots]]; but this has no effect on the graphs, they still show the default Y-Axis range of 0 to 1. The only way that I can change the y-Axis is to do it manually via this: graph.defaultPlotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0.0f)) length:CPTDecimalFromFloat(500.0f)]; however this doesn't work well for graphs with smaller ranges (10-50), as you can imagine. Is there any method to retrieve the highest y-value from my dataset so that I can manually set the maximum y-Axis to that value? Or is there a better alternative?

    Read the article

  • db2 sql pattern matching

    - by Jitesh
    I have a table in db2 which has the following fields int xyz; string myId; string myName; Example dataset xyz | myid | myname -------------------------------- 1 | ABC.123.456 | ABC 2 | PRQS.12.34 | PQRS 3 | ZZZ.3.2.2 | blah I want to extract the rows where myName matches the character upto "." in the myId field. So from the above 3 rows, I want the firs 2 rows since myName is present in myId before "." How can I do this in the query, can I do some kind of pattern matching inside the query?

    Read the article

  • reading excel file in vb.net

    - by Mark
    can anyone help me on how to know EOF of excel using vb.net? i have this code but it crash when i try delete the proceeding rows from row 6 to downward. my problem is, my code was still reading a null values of rows that i deleted in excel.. this is my code: Dim xlsConn As New OleDbConnection Dim xlsAdapter As New OleDbDataAdapter Dim xlsDataSet As New DataSet xlsConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pathName & " ; Extended Properties=Excel 8.0") strSQL = "SELECT * FROM [Sheet1$]" xlsAdapter.SelectCommand = New OleDbCommand(strSQL, xlsConn) xlsDataSet.Clear() xlsAdapter.Fill(xlsDataSet) ListView1.Items.Clear() Dim listItem As ListViewItem For ctr As Integer = 0 To xlsDataSet.Tables(0).Rows.Count - 1 listItem = ListView1.Items.Add(xlsDataSet.Tables(0).Rows(ctr).Item("EmpNo").ToString) listItem.SubItems.Add(xlsDataSet.Tables(0).Rows(ctr).Item("EmpName").ToString) Next Can anyone help me to fix this bugs!

    Read the article

  • How to make VB to execute my SQL SP with parameters?

    - by fema
    Hi, I have a database in MS SQL Server 2008, I have Stored Procedures. One of them does an INSERT with parameters. It works in Server Management Studio. Now I'd like to make a button in Visual Basic 2008 that executes this SP. I have made a DataSet, it contains my 3 SP's, I can easily use 2 of them, because they return data, but the one I'm having trouble with doesn't. Could anyone please tell me how to make VB to execute it? (The command should look like this: "EXECUTE SP2 a, b, c, d".) Thanks in advance

    Read the article

  • Jquery ajax load of JSON in unit tests

    - by wmitchell
    I'm trying to load a dataset in jasmine for my tests like such ... However as its a json call I cant seem to always get the test denoted by "it" to wait till the JSON call has finished before using its array. I tried using the ajaxStop function to no avail. Any ideas ? describe("simple checks", function() { var exampleArray = new Array(); beforeEach(function(){ $(document).ajaxStop(function() { $(this).unbind("ajaxStop"); $.getJSON('/jasmine/obj.json', function(data) { $.each( json.jsonattr, function(i, widgetElement) { exampleArray.push(new widget(widgetElement)); }); }); }); }); it("use the exampleArray", function() { doSomething(exampleArray[0]); // frequently this is coming up as undefined });

    Read the article

  • How to programmatically set a data cell of database in VB.Net?

    - by manuel
    I have a Microsoft Access database file connected to VB.NET. In the database table, I have a 'No.' and a 'Status' column. Then I have a textbox where I can input an integer. I also have a button, which will change the data cell in 'Status' where 'No.' = textbox.Text(), when I click it. Let's say I want the 'Status' cell to be changed to "Low". What codes should I put in the button_Click event handler? Here is the codes I used to retrieve and display the database table. Public Class theForm Dim con As New OleDb.OleDbConnection Dim ds As New DataSet Dim daTitles As OleDb.OleDbDataAdapter Private Sub theForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\db1.mdb" con.Open() daTitles = New OleDb.OleDbDataAdapter("SELECT * FROM Titles", con) daTitles.Fill(ds, "Titles") DataGridView1.DataSource = ds.Tables("Titles") DataGridView1.AutoResizeColumns() End Sub

    Read the article

  • Java library to partially export a database while respecting referential integrity constraints

    - by Mwanji Ezana
    My production database is several GB's uncompressed and it's getting to be a pain to download and run locally when trying to reproduce a bug or test a feature with real data. I would like to be able to select the specific records that interest me, then have the library figure out what other records are necessary to produce a dataset that respects the databases integrity constraints and finally print it out as a list of insert statements or dump that I can restore. For example: given Author, Blog and Comment tables when I select comments posted after a certain date I should get inserts for the Blog records the comments have foreign keys to and the Author records those Blogs have foreign keys to.

    Read the article

  • How can I use linq to build an object from 1 row of data?

    - by Hcabnettek
    Hi All, I have a quick linq question. I have a stored proc that should return one row of data. I would like to use a lambda to build an object. Here's what I'm currently doing which works, but I know I should be able to use First instead of Select except I can't seem to get the syntax correct. Can anyone straighten me out here? Thanks for any help. var location = new GeoLocationDC(); DataSet ds = db.ExecuteDataSet(dbCommand); if(ds.Tables[0].Rows.Count == 1) { var rows = ds.Tables[0].AsEnumerable(); var x = rows.Select( c => new GeoLocationDC { Latitude = Convert.ToInt32(c.Field<string>("LATITUDE")), Longitude = Convert.ToInt32(c.Field<string>("LONGITUDE")) }).ToList(); if(x.Count > 0 ) { location = x[0]; } Cheers, ~ck }

    Read the article

  • Is there any framework for Windows Forms, DB driven application development/prototyping?

    - by dolzenko
    I'm writing simple database driven application, 80% of functionality is CRUD operations on about 15 tables. Coming from web development background I figured I can cover almost all of these CRUD cases with Rails scaffolding or say Django admins. So I started to look around for Rails/Django-like framework but for Windows Forms applications (ofcourse I understand that "rich client" application development significantly differs from a web development and I'm not expecting anything really similar). I was surprised that except for a variety of ORMs (let's call it Model-layer) it seems like I'm left with little choice when it comes to View-Controller layer. Maybe I'm missing something? PS. I evaluated Visual Studio DataSet Designer, but it seems to work only for the most simple cases, and requires additional code for any slightly nontrivial task. (added) so far I've found: TrueView for .NET (thanks to Vijay Patel) NConstruct

    Read the article

  • How do I draw an arrow on a histogram drawn using ggplot2?

    - by jon
    Here is dataset: set.seed(123) myd <- data.frame (class = rep(1:4, each = 100), yvar = rnorm(400, 50,30)) require(ggplot2) m <- ggplot(myd, aes(x = yvar)) p <- m + geom_histogram(colour = "grey40", fill = "grey40", binwidth = 10) + facet_wrap(~class) + theme_bw( ) p + opts(panel.margin=unit(0 ,"lines")) I want to add labels to bars which each subject class fall into and produce something like the post-powerpoint processed graph. Is there way to do this within R ? ...... Edit: we can think of different pointer such as dot or error bar, if arrow is not impossible Let's say the following is subjects to be labelled: class name yvar 2 subject4 104.0 3 subject3 8.5 3 subject1 80.0 4 subject2 40.0 4 subject1 115.0 classd <- data.frame (class = c(2,3,3,4,4), name = c ("subject4", "subject3", "subject1", "subject2", "subject1"), yvar = c(104.0, 8.5,80.0,40.0, 115.0))

    Read the article

  • storing multiple values as binary in one field

    - by Enghoej
    Hi I have a project where I need to store a large number of values. The data is a dataset holding 1024 2Byte Unsigned integer values. Now I store one value at one row together with a timestamp and a unik ID. This data is continously stored based on a time trigger. What I would like to do, is store all 1024 values in one field. So would it be possible to do some routine that stores all the 1024 2byte integer values in one field as binary. Maybe a blobfield. Thanks. Br. Enghoej

    Read the article

  • Trying to get JQuery Autocomplete working on Asp.Net page.

    - by JasonMHirst
    Can someone shed some light on the problem please: I have the following: $(document).ready(function () { $("#txtFirstContact").autocomplete({url:'http://localhost:7970/Home/FindSurname' }); }); On my Asp.Net page. The http request is a function on an MVC Controller and that code is here: Function FindSurname(ByVal surname As String, ByVal count As Integer) Dim sqlConnection As New SqlClient.SqlConnection sqlConnection.ConnectionString = My.Settings.sqlConnection Dim sqlCommand As New SqlClient.SqlCommand sqlCommand.CommandText = "SELECT ConSName FROM tblContact WHERE ConSName LIKE '" & surname & "%'" sqlCommand.Connection = sqlConnection Dim ds As New DataSet Dim da As New SqlClient.SqlDataAdapter(sqlCommand) da.Fill(ds, "Contact") sqlConnection.Close() Dim contactsArray As New List(Of String) For Each dr As DataRow In ds.Tables("Contact").Rows contactsArray.Add(dr.Item("ConSName")) Next Return Json(contactsArray, JsonRequestBehavior.AllowGet) End Function As far as I'm aware, the Controller is returning JSON data, however I don't know if the Function Parameters are correct, or indeed if the format returned is interprettable by the AutoComplete plugin. If anyone can assist in the matter I'd really appreciate it.

    Read the article

  • OracleDataAdapter returns no rows, but the query string works in SQLDeveloper

    - by belzebu
    visual studion 2008 oracle db 11.1.0.7 oracle client for .NET I have a relatively simple query, that selects the rows from across multiple tables (up to 4) using joins. OracleDataAdapter returns no rows for the only dataset's table, but if I copy and paste that query in SQLDeveloper then I get the desired results. I can get the data from other tables using the adapter with no problem, but it seems like it struggles with the bit longer selection query (string length is ~ 300 (not that much at all)) Connection string for the connection is 100% correct. Any ideas? thank you...

    Read the article

  • Excel - referenced values via OleDB from .Net client

    - by ho
    I'm trying to read an Excel file (.xls, I think Excel 2003 compatible) via OleDB, but it fails to get the values for referenced fields. This is my current test code (please note, this is just part of the class): Private m_conn As OleDbConnection Public Sub New(ByVal fileName As String) Dim connString As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0;", fileName) m_conn = New OleDbConnection(connString) m_conn.Open() End Sub Public Sub GetSheet(ByVal sheet As String) Dim query As String = String.Format("SELECT * FROM [{0}]", sheet) Using cmd As OleDbCommand = m_conn.CreateCommand() cmd.CommandText = query Dim ds As New DataSet() Dim a As New OleDbDataAdapter(cmd) Using rdr As OleDbDataReader = cmd.ExecuteReader() While rdr.Read() Debug.WriteLine(rdr.Item(0).ToString()) End While End Using End Using End Sub But if the value is a reference (something like =+'MySheetName'!K37), I just get a DBNull from the call to rdr.Item(0). I can get around this by automating Excel instead, but would prefer not to have to use Excel automation so wondering if anyone knows how to do it.

    Read the article

  • function to find common rows between more than two data frames in R

    - by biohazard
    I have 4 data frames, and would like to find the rows whose values in a certain column do not exist in any of the other data frames. I wrote this function: #function to test presence of $Name in 3 other datasets common <- function(a, b, c, d) { is.B <- is.numeric(a$Name %in% b$Name) == 1 is.C <- is.numeric(a$Name %in% c$Name) == 1 is.D <- is.numeric(a$Name %in% d$Name) == 1 t <- as.numeric(is.B & is.C & is.D) t } However, the output is always t = 0. This means that it tells me that there are no unique rows in any data sets, even though the datas frames have very different numbers of rows. Since there are no duplicate rows in any of the data frames, I should be getting t = 1 for at least some rows in the biggest dataset. Can someone figure out what I got wrong?

    Read the article

  • VS.NET 2008 - Stop Giving me a Table Adapter.......

    - by mdjtlj
    I'm trying to see if there is a way to stop VS.NET 2008 from doing something which is very annoying to me and our particular standards of coding. When you create a blank dataset and then drag over from the server a table (or tables), VS.NET automatically creates a table adapter for that table, puts the connection information into the XML definition of the XSD and also puts a setting on the property to this database. This requires us to delete the table adapter, get rid of the connection info the XSD file and then go delete the local setting which has been added to the project. I know that I could probably leave all of that stuff and not use it, but that just seems wrong and bloated. Any idea on how to turn this off?

    Read the article

  • ssrs: one static row matrix, multiple columns will not filter out nulls

    - by pbarton99
    Using a ssrs 2005 matrix client side. I want to list the multiple addresses of one person, hence one row, multiple columns. The Column field is =Fields!StreetName.Value. The data details field is =First(Fields!StreetPrefix.Value) & " " & First(Fields!StreetName.Value). The datasource has a row for each address; however, some rows will have nulls since the datasource is composed of outer joins. The column grouping works, but the first column is always empty, (first 2 rows of datasource are null) addresses appear only after the empty column. I want to filter out nulls on the matrix, but its like the filter is ignored. I have also tried having the dataset return an empty string for a null streetname and setting the filter to =Fields!StreetName.Value != ="" but no difference. What am I missing?

    Read the article

  • Passing Data from Usercontrol to controller

    - by nitinkhanna
    Hi, I am new to MVC, and trying something and got stuck somewhere in between. I have a user control there I have three textbox html type(ID, Lastname, firstname) and a submit buttom. I set the button like <input type="button" value="Search" onclick="location.href='<%= Url.Action("action", "controller") %>'" /> I have called this usercontrol on some view through <%= Html.Partial("ucName") %> Now on pressing that button(on user control) I need to pass the data from these textboxes to controller again to some specific action(Http Post action). By using this data I want to do some database interaction and storing the result in a dataset and pass this data set to same view again to show up in some Grid. I know the first part in conventional Asp.net can be done by raising the event through delegate but don't know how to do that in MVC.

    Read the article

  • Exporting DataTable using FileHelpers

    - by Dat
    I want to export the contents of a DataTable to a text delimited file using FileHelpers, is this possible? Here is what I have so far: // dt is a DataTable with Rows in it DelimitedClassBuilder cb = new DelimitedClassBuilder("MyClassName", "|", dt); Type t = cb.CreateRecordClass(); FileHelperEngine engine = new FileHelperEngine(t); I have to convert the contents of dt to an array of type "MyClassName" but I'm not sure how to do that? I know there is a FileDataLink class but none of them work with DataTable (or even a DataSet).

    Read the article

  • Binning into timeslots - Is there a better way than using list comp?

    - by flyingcrab
    I have a dataset of events (tweets to be specific) that I am trying to bin / discretize. The following code seems to work fine so far (assuming 100 bins): HOUR = timedelta(hours=1) start = datetime.datetime(2009,01,01) z = [dt + x*HOUR for x in xrange(1, 100)] But then, I came across this fateful line at python docs 'This makes possible an idiom for clustering a data series into n-length groups using zip(*[iter(s)]*n)'. The zip idiom does indeed work - but I can't understand how (what is the * operator for instance?). How could I use to make my code prettier? I'm guessing this means I should make a generator / iterable for time that yields the time in graduations of an HOUR?

    Read the article

  • How to enable/create elements on the fly

    - by Simon S
    Hi all I am using a combination of PHP, jQuery and Spry to serve a series of listboxes in which a user will select first the type of vehicle, then the make, then the model and finally the specific model. All my listboxes (SELECT) are working fine, and they update properly using the Spry elements. Each listbox is populated from a different Spry XML Dataset, and this is my problem. If I present all four listboxes to the user, the script has to go and fetch all four lots of XML to populate all four listboxes, taking several seconds. What I want to do is to create/enable the listboxes in order, so at the user selects from the first listbox, the second is created/enabled, when they select from the second, the third is created/enabled... and so on. Setting the disabled attribute is no good because the script has already fetched the XML before this is processed. Any ideas?? Si

    Read the article

  • C# property in a form class only accessable after formload event

    - by Spooky2010
    using vs2008, c# Howdy, Im instantiating and calling Form B from Form A. FormB has some custom properties, to allow me to pass it things like sqlAdaptors and dataset instances. When i instantiate and show Form B from Form A as a dialog form with a Using statement, it all works fine, but i find the properties i pass are not available in Form B until after the form_load event has fired. I was under the impression the properties when passed to a instantiated class should be available from a constructor, but this is not the case. If it try to access the properties before the form load event i get a null reference exception. Is this correct behavior ? It is very annoying. thanks for any help

    Read the article

  • Arrays/Lists and computing hashvalues (VB, C#)

    - by Jeffrey Kern
    I feel bad asking this question but I am currently not able to program and test this as I'm writing this on my cell-phone and not on my dev machine :P (Easy rep points if someone answers! XD ) Anyway, I've had experience with using hashvalues from String objects. E.g., if I have StringA and StringB both equal to "foo", they'll both compute out the same hashvalue, because they're set to equal values. Now what if I have a List, with T being a native data type. If I tried to compute the hashvalue of ListA and ListB, assuming that they'd both be the same size and contain the same information, wouldn't they have equal hashvalues as well? Assuming as sample dataset of 'byte' with a length of 5 {5,2,0,1,3}

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >