Search Results

Search found 3322 results on 133 pages for 'dataset designer'.

Page 5/133 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Read xml file and import only one table from multiple tables from xml file in the dataset at a time.

    - by Harikrishna
    I want to store the data in the xml file and retrieve the data from that. I have defined more than table in that xml file.Now to read the tables I am using dataset ds = new dataset(); ds.ReadXml(xmlfilepath); Now this dataset contains all the tables those are in xml file when we read the xml file into dataset. But I want only one specified table at a time in a dataset by condition. Like there are PersonalInfo,OtherInfo,PropertiesInfo tables in the xml file. But I want only OtherInfo table in dataset what I should do ?

    Read the article

  • Preserving DataRowState when serializing DataSet using DataContractSerializer

    - by user349453
    For various reasons I am having to send a typed dataset to a WCF service endpoint. This works fine except that upon Deserializing, the RowState of each row in each DataTable is set to 'Added', regardless of what they were on the client. If I write the serialized stream out to a file, I see that the RowState is not part of the Serialized data. How can I add this so that I can preserve the RowState across service boundaries? Not that I think it matters, but the client process is running .net 3.5 while the service process is running .net 4.0

    Read the article

  • Why can't I see the 'dataset project' property in Visual Studio DataSet designer?

    - by Ryan
    Hi, I am trying to follow 'n tier app design' tutorials and they tell me to set the DataSet Project property from the Data Set Designer in VS, to split table adaptors and entities into seprate projects. I can't see that property! (I'm looking in the same place shown on the videos... all other properties match) Does anybody know why? The video is here http://windowsclient.net/learn/video.aspx?v=14625 (4:36 is where the property is set) I'm using VS c# 2008 Express, with SQL Server Express 2008. Thanks a lot for any help Ryan

    Read the article

  • DataSet.GetXml not returning null results

    - by pistacchio
    Hi, whenever I convert a DatSet into an XML with DataSet.GetXml, any null value is ignored, so, where i expect this: <value1>a</value1> <value2></value2> <value3>c</value3> I get this instead: <value1>a</value1> <value3>c</value3> Any quick and dirty way to handle this? Thanks EDIT: I think a solution would be using WriteXml. Could anyone provide me with a sample of using it WITHOUT writing to a file but getting a string just like GetXml does? Thanks

    Read the article

  • Inserting Rows in Relationship using a Strongly Typed DataSet

    - by Manuel Faux
    I'm using ADO.NET with a strongly typed dataset in C# (.NET 3.5). I want to insert a new row to two tables which are related in an 1:n relation. The table Attachments holds the primary key part of the relation and the table LicenseAttachments holds the foreign key part. AttachmentsDataSet.InvoiceRow invoice; // Set to a valid row, also referenced in InvoiceAttachments AttachmentsDataSet.AttachmentsRow attachment; attachment = attachmentsDataSet.Attachments.AddAttachmentsRow("Name", "Description"); attachmentsDataSet.InvoiceAttachments.AddInvoiceAttachmentsRow(invoice, attachment); Of course when I first update the InvoicesAttachments table, I'll get a foreign key violation from the SQL server, so I tried updating the Attachments table first, which will create the rows, but will remove the attachment association in the InvoiceAttachments table. Why? How do I solve this problem?

    Read the article

  • Load DataSet into an XML Document - C#.Net

    - by NLV
    Hello I'm trying to read a dataset as xml and load it into an XML Document. XmlDocument contractHistoryXMLSchemaDoc = new XmlDocument(); using (MemoryStream ms = new MemoryStream()) { //XmlWriterSettings xmlWSettings = new XmlWriterSettings(); //xmlWSettings.ConformanceLevel = ConformanceLevel.Auto; using (XmlWriter xmlW = XmlWriter.Create(ms)) { xmlW.WriteStartDocument(); dsContract.WriteXmlSchema(xmlW); xmlW.WriteEndDocument(); xmlW.Close(); using (XmlReader xmlR = XmlReader.Create(ms)) { contractHistoryXMLSchemaDoc.Load(xmlR); } } } But i'm getting the error - "Root Element Missing". Any ideas? NLV

    Read the article

  • how create a sql database fom a stongly typed dataset

    - by Keith Vinson
    I'm looking for an easy way to transfer a database schema I have developed inside visual studio as a strongly typed dataset (xsd file) into a corresponding sql server database. Silly me I assumed the process would be forthright, but I can't find out how to do it. I assume I could duplicate the tables column by column, but that seems so error prone. Does anyone know of a way to perform the schema transfer like this? Maybe a tool to translate the xsd file into a corresponding sql server ddl file? Final thought once I have the schema transferred moving data around between the two data stores will be straight forward, its just getting the schemas synced that has me stumped... Thanks, Keith

    Read the article

  • sqlite - Foreign keys in VS2008 Designer

    - by rene marxis
    Hello I'm starting over to use strong typed datasets in VS 2008 with sqlite and running into a problem. I have some tables that have foreign keys allready defined in the database. I can see those in the Server-Explorer. Now i create a new strong typed Dataset with the designer and add only one table from that realtion to the dataset. Then i like to add the second one and i get an error message "Unexpected error ... Source: Microsoft.VSDesigner; ErrorCode:-1" No Additional Info. The error does not occure if i add both tables at the same time (say i drag them from the serverexplorer). Is there any way to add subsequent tables to an dataset that are in relation(s) to alreay added once? Many thanks _rene

    Read the article

  • create a dataset by using modulo division method

    - by ayoom
    create a dataset with 101 integers. Use the modulo division method of hashing to store the random data values into hash tables with table sizes of 7, 51, and 151. Use the linear probing and quadratic method of collision resolution. Print out the tables after the data values have been stored. Search for 10 different values in each of the three hash tables, counting the number of comparisons necessary. Print out the number of comparisons necessary in each case, in tabular form.

    Read the article

  • How do I connect a dataGrid to a DataSet

    - by orangecl4now
    using System.Windows; namespace Telephone_Directory { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); telephone2010DataSet dataSet = new telephone2010DataSet(); telephone2010DataSetTableAdapter adapter = new telephone2010DataSetTableAdapter(); } } } The above is my code is a new project. Visual Studio 2010 complains that " the type or namespace 'telephone2010DataSetTableAdapter' could not be found." I created a new solution. I right clicked the solution name and selected "Add Existing Item" and located my Microsoft Access DB file. I followed the wizard and it setup the necessary XSD files. I started coding and I got this message. I did a little google-ing and I cant figure it out. This is a WPF application created with Visual Studio 2010.

    Read the article

  • How to insert many rows of data from arrays/lists to SQL Server (DataSet, DataTable)

    - by Kamil
    I need little help with transferring data from variables, arrays, lists to my SQL Server. Im not bad in SQL, but im not familiar with DataSet, DataTable objects. My data is now stored in list of strings (List). Every string in that list looks similar to this: QWERTY,19920604,0.91,0.35,0.34,0.35,343840 There are about 900000 rows like this. Target datatypes in SQL Server: BIGINT (primary key, im not inserting it, its identity(1,1)) VARCHAR(10), DATE, DECIMAL(10,2), DECIMAL(10,2), DECIMAL(10,2), DECIMAL(10,2), INT How to convert that data to SQL Server data types? How to insert that data into SQL Server? Also i need some progress bar updates between inserts. I could do this using old-fashion SQL command, but i have learn more modern way :)

    Read the article

  • Simple, but I'm stuck ....Updating a DataSet using code

    - by user2518039
    I have a simple Windows form in VB: textbox bound thru an adapter and a bindingsource to my dataset. I have a button that on Click I want it to update the database. The form loads and the first data row shows in the textbox, I change the text then click my button but no update happens. Any ideas what I'm doing wrong, or how I should do this?? Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.AToolsTableAdapter.Fill(Me.Qedsandb_TroyDataSet.aTools) End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click AToolsTableAdapter.Update(Qedsandb_TroyDataSet.aTools) End Sub End Class

    Read the article

  • Crazy VS Designer Errors

    - by BlueRaja
    Here's a strange one. After renaming a class, one of my forms began giving me errors in the designer, refusing to open. Funny thing is, the form worked just fine when I ran the program. I began reverting my changes to deduce the problem. I have now reverted completely back to the last commit - in which I know the form was working in the designer - cleaned the solution, and deleted the bin/ and obj/ folders, as well as the *.suo file for good measure. The form still does not display in designer. Here are the errors it gives: Could not find 'MyNamespace.MyControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. The variable 'myControl1' is either undeclared or was never assigned. The variable is both declared and assigned, and MyControl builds fine (again, the form works fine when the program is actually run). Stranger still, if I try to create a new form and drag a MyControl onto it, I get this Entity-Framework error: Failed to create component 'MyControl'. The error message follows: 'System.ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) at System.Data.EntityClient.EntityConnection..ctor(String connectionString) at System.Data.Objects.ObjectContect.CreateEntityConnection(String connectionString) etc. etc. There is nothing wrong with my connection string: it worked before, and, again, it works when I actually run the program (the control already exists on the old form from the previous commit). Any ideas whatsoever? I am completely at a loss. [Edit] The only significant code: MyControl.cs public MyControl() { _entities = new MyEFEntities(); //Entity-framework generated class } MyForm.Designer.cs private void InitializeComponent() { this.myControl1 = new MyNamespace.MyControl(); ... this.Controls.Add(this.myControl1); } MyEFDatabase.Designer.cs public MyEFEntities() : base("name=MyEFEntities", "MyEFEntities") { ... } App.Config <connectionStrings> <add name="MyEFEntities" connectionString="metadata=res://*/MyEFDatabase.csdl|res://*/MyEFDatabase.ssdl|res://*/MyEFDatabase.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=MyDatabaseServer;Initial Catalog=MyDatabase;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> </connectionStrings> I've tried the "replace &quot; with '" trick - didn't help. [Edit2] It is happening to new projects also, but not immediately. Only after fiddling around a bit (it has something to do with adding a many-to-one relationship that EF did not figure out on its own), but I can't figure out the exact steps to reproduce.

    Read the article

  • Dataset.ReadXml() - Invalid character in the given encoding

    - by NLV
    Hello all I have saved a dataset in the sql database in an xml column using the following code. XmlDataDocument dd = new XmlDataDocument(dataset); and passing this xml document as sql parameter using param.value = new XmlNodeReader(dd); The XML is like <NewDataSet><SubContractChangeOrders><AGCol>1</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>006</Contract_x0020_Number><ContractID>30</ContractID><ChangeOrderID>211</ChangeOrderID><Amount>0.0000</Amount><Udf_CostReimbursableFlag>false</Udf_CostReimbursableFlag><Udf_CustomerCode /><Udf_SubChangeOrderStatus /></SubContractChangeOrders><SubContractChangeOrders><AGCol>2</AGCol><SCO_x0020_Number>002</SCO_x0020_Number><Contract_x0020_Number>006</Contract_x0020_Number><ContractID>30</ContractID><ChangeOrderID>212</ChangeOrderID><Amount>0.0000</Amount><Udf_CostReimbursableFlag>false</Udf_CostReimbursableFlag></SubContractChangeOrders><SubContractChangeOrders><AGCol>3</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>111</Contract_x0020_Number><ContractID>87</ContractID><ChangeOrderID>12</ChangeOrderID><Amount>300.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>4</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>222</Contract_x0020_Number><ContractID>80</ContractID><ChangeOrderID>6</ChangeOrderID><Amount>100.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>5</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>777</Contract_x0020_Number><ContractID>79</ContractID><ChangeOrderID>5</ChangeOrderID><Amount>200.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>6</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>786</Contract_x0020_Number><ContractID>77</ContractID><ChangeOrderID>3</ChangeOrderID><Amount>100.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>7</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>787</Contract_x0020_Number><ContractID>78</ContractID><ChangeOrderID>4</ChangeOrderID><Amount>500.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>8</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con 009</Contract_x0020_Number><ContractID>219</ContractID><ChangeOrderID>78</ChangeOrderID><Amount>9000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>9</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con 010</Contract_x0020_Number><ContractID>220</ContractID><ChangeOrderID>79</ChangeOrderID><Amount>13000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>10</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con 012</Contract_x0020_Number><ContractID>222</ContractID><ChangeOrderID>83</ChangeOrderID><Amount>2300.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>11</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con 020</Contract_x0020_Number><ContractID>226</ContractID><ChangeOrderID>86</ChangeOrderID><Amount>5400.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>12</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con 021</Contract_x0020_Number><ContractID>227</ContractID><ChangeOrderID>87</ChangeOrderID><Amount>2300.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>13</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con001</Contract_x0020_Number><ContractID>208</ContractID><ChangeOrderID>72</ChangeOrderID><Amount>3000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>14</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con002</Contract_x0020_Number><ContractID>209</ContractID><ChangeOrderID>73</ChangeOrderID><Amount>400.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>15</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con003</Contract_x0020_Number><ContractID>210</ContractID><ChangeOrderID>74</ChangeOrderID><Amount>6000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>16</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con004</Contract_x0020_Number><ContractID>211</ContractID><ChangeOrderID>75</ChangeOrderID><Amount>9000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>17</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Con005</Contract_x0020_Number><ContractID>213</ContractID><ChangeOrderID>76</ChangeOrderID><Amount>17000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>18</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>Cont001</Contract_x0020_Number><ContractID>228</ContractID><ChangeOrderID>89</ChangeOrderID><Amount>2000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>19</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>PUR001</Contract_x0020_Number><ContractID>229</ContractID><ChangeOrderID>88</ChangeOrderID><Amount>1000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>20</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>PUR002</Contract_x0020_Number><ContractID>230</ContractID><ChangeOrderID>90</ChangeOrderID><Amount>3000.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>21</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>SC-002</Contract_x0020_Number><ContractID>2</ContractID><ChangeOrderID>7</ChangeOrderID><Amount>200.0000</Amount></SubContractChangeOrders><SubContractChangeOrders><AGCol>22</AGCol><SCO_x0020_Number>001</SCO_x0020_Number><Contract_x0020_Number>SC-004</Contract_x0020_Number><ContractID>7</ContractID><ChangeOrderID>65</ChangeOrderID><Amount>1000.0000</Amount></SubContractChangeOrders></NewDataSet> I'm trying to read it back as follows using (SqlConnection con = new SqlConnection("Server=#####;Initial Catalog=#####;User ID=####;Pwd=########")) { using (SqlCommand com = new SqlCommand("select * from dbo.tbl_#####", con)) { using (SqlDataAdapter ada = new SqlDataAdapter(com)) { ada.Fill(dt); MemoryStream ms = new MemoryStream(); object contractXML1 = dt.Rows[0]["SCOXML1"]; System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); bf.Serialize(ms, contractXML1); ms.Seek(0, SeekOrigin.Begin); ds.ReadXml(ms); } } } I'm getting the following error Data at the root level is invalid. Line 1, position 6. Any ideas? NLV

    Read the article

  • How to improve workflow between developer and designer with Expression Blend?

    - by Amenti
    We use WPF and Expression Blend 4. I'm trying to improve our workflow by tutoring one of our designers to use it for styling and animation. Slowly but surely I get the impression Blend in itself is to technical for the designer in question. I myself use it only occasionally (it's great for Visual States for instance) because a lot of things are easier done in code or not possible at all in Blend alone. It seems a developer with design experience is a lot more productive with it than a sole designer. Are there any good online resources or advice you could give me how to improve this situation?

    Read the article

  • How can I improve the workflow between developer and designer with Expression Blend?

    - by Amenti
    We use WPF and Expression Blend 4. I'm trying to improve our workflow by tutoring one of our designers to use it for styling and animation. Slowly but surely I get the impression Blend in itself is to technical for the designer in question. I myself use it only occasionally (it's great for Visual States for instance) because a lot of things are easier done in code or not possible at all in Blend alone. It seems a developer with design experience is a lot more productive with it than a sole designer. Are there any good resources or advice as to how I can improve this workflow?

    Read the article

  • VB.net Dataset display different column

    - by Josh
    Hello, I am sure this has to a comon thing I just can't find it. I am making a combobox from my data source. Basically, This is a projects form and the user needs to select the the primary contact which is contrained by the customer id (GETbyCustomerID) set in another field. I have it working... mostly except the combobox only displays the contact ID which is completely useless to the user. I need to know how to display the First and Last name (both are seperate columns in the table). Any help? I am just using the designer.

    Read the article

  • “Could not find type” error loading a form in the Designer

    - by Vaccano
    This is the exact same question as this one: “Could not find type” error loading a form in the Designer Before anyone goes closing my question please read that one. You will realize that it did not get a real answer. I hope to get a full answer (rather than a workaround) from this question. When I create a class that descends from Control and uses generics, that class fails to load in the designer. Here is and example: class OwnerDrawnListBox<T> : System.Windows.Forms.Control { private readonly List<T> _items; // Other list box private stuff here public OwnerDrawnListBox() { _items = new List<T>(); } // More List box code } I then use this in my designer: private OwnerDrawnListBox<Bag> lstAvailable; private void InitializeComponent() { // Used to be System.Windows.Forms.ListBox(); this.lstAvailable = new ARUP.ScanTrack.Mobile.OwnerDrawnListBox<Bag>(); // Other items } If the generic class is subclassed (to a non-generic) then the referenced question says that it works fine (ie if I made Class BagOwnerDrawListBox: OwnerDrawnListBox<Bag>). What I want to know is there a way to "fix" this so that the generic item is accepted by the designer? Side Note: I am using the Compact Framework.

    Read the article

  • DataSet does not support System.Nullable<>

    - by a_m0d
    I'm trying to set the DataSource for a Crystal Reports report, but I've run into a few problems. I've been following a guide written by Mohammad Mahdi Ramezanpour, and have managed to get all the way to the last part now (setting the DataSource). However, I have a problem that Mohammad does not seem to have - when I pass the results of my query to the report, I end up with the following exception: DataSet does not support System.Nullable< This is the query I am using: public IQueryable<Part> GetPartsToDisplayOnStockReport() { return from part in db.Parts where part.showOnStockReport == true select part; } and the way I pass it to the Report: public ActionResult ViewStockReport() { StockReport stockReport = new StockReport(); var parts = ordersRepository.GetPartsToDisplayOnStockReport().ToList(); stockReport.SetDataSource(parts); Stream stream = stockReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat); return File(stream, "application/pdf"); } I have also tried changing my query to this code, in the hope that it would fix my problem: return (from part in db.Parts where part.showOnStockReport == true select part) ?? db.Parts.DefaultIfEmpty(); but it still complained about the same problem. How can I pass the results of this query to my report, to use it as a data source? Also, if each of my Parts object contains other objects / collections of other objects, will I be able to reference them in the report with a datasource like this?

    Read the article

  • dataset - set parent child relations

    - by Night Walker
    Hello all I am trying to set the relations of rows in DataSet and then to show that relation in XTraaTreeList as tree with relations. | --| ----| but i get | | | I am doing this code but i get a view without any relations i get them all in one level. Any idea what i am doing wrong ? this.treeList1.BeginUpdate(); this.dataTable1.Clear(); DataRow dr = this.dataTable1.NewRow(); dr[0] = "father"; dr[1] = true; dr[2] = "ddd"; this.dataTable1.Rows.Add(dr); DataRow dr1 = this.dataTable1.NewRow(); dr1[0] = "son"; dr1[1] = true; dr1[2] = "ddd"; dr1.SetParentRow(dr); this.dataTable1.Rows.Add(dr1); DataRow dr2 = this.dataTable1.NewRow(); this.dataTable1.ParentRelations() dr2[0] = "grand son"; dr2[1] = true; dr2[2] = "ddd"; dr2.SetParentRow(dr1); this.dataTable1.Rows.Add(dr2); this.treeList1.EndUpdate();

    Read the article

  • typed-dataset initializer problem with C# windows app.

    - by Eyla
    Greetings, I'm working in windows application using C#. I have typed-dataset called packetsDBDataSet and it has table adapter called packetsTableAdapter with method to insert data called InsertPackets(). when I want to insert new data I used a code that I used before with asp.net page and it was working ok but not I'm getting error. here is the code: public packetsDBDataSetTableAdapters.packetsTableAdapter ds = new packetsDBDataSetTableAdapters.packetsTableAdapter(); public packetsDBDataSet.packetsDataTable insert = ds.InsertPackets(); and here is the error: Error 1 A field initializer cannot reference the non-static field, method, or property 'Packets.Form1.ds' C:\Users\Ali\Documents\Visual Studio 2008\Projects\Packets-3\Packets\Packets\Form1.cs 26 59 Packets I already included to my project: using Packets; using Packets.packetsDBDataSetTableAdapters; please advice to solve this problem. Update : I also tried : public packetsDBDataSetTableAdapters.packetsTableAdapter ds = new packetsDBDataSetTableAdapters.packetsTableAdapter(); ds.InsertPackets("1","2","3"); and I'm getting this error: Error 1 Invalid token '(' in class, struct, or interface member declaration C:\Users\Ali\Documents\Visual Studio 2008\Projects\Packets-3\Packets\Packets\Form1.cs 28 29 Packets

    Read the article

  • Dataset bind to Gridview within WCF REST retrieval method and Linq to Sql

    - by user643794
    I used a WCF REST template to build a WCF service library to create PUT and GET calls. PUT method works fine sending my blob to a database. On the GET, I want to be able to access the web service directly and display the results from a stored procedure as a dataset and bind this to a gridview. The stored procedure is a simple select statement, returning three of the four columns from the table. I have the following: [WebGet(UriTemplate = "/?name={name}", ResponseFormat = WebMessageFormat.Xml)] public List<Object> GetCollection(string name) { try { db.OpenDbConnection(); // Call to SQL stored procedure return db.GetCustFromName(name); } catch (Exception e) { Log.Error("Stored Proc execution failed. ", e); } finally { db.CloseDbConnection(); } return null; } I also added Linq to SQL class to include my database table and stored procedures access. I also created the Default.aspx file in addition to the other required files. protected void Page_Load(object sender, EventArgs e) { ServiceDataContext objectContext = new ServiceDataContext(); var source = objectContext.GetCustFromName("Tiger"); Menu1.DataSource = source; Menu1.DataBind(); } But this gives me The entity type '' does not belong to any registered model. Where should the data binding be done? What should be the return type for GetCollection()? I am stuck with this. Please provide help on how to do this.

    Read the article

  • Problem consuming a dataset via a .NET web service from Flex-ActionScript

    - by DEH
    Hi, I am returning a .NET dataset to Flex Actionscript via a web service. Actionscript snippet as follows: var websvc:WebService = new WebService(); websvc.useProxy=false; websvc.wsdl = "http://localhost:13229/test/mysvc.asmx?WSDL"; websvc.loadWSDL(); var operation:Operation = new Operation(null, "GetData"); operation.arguments.command="xx_gethierdata_"+mode+"_"+identifier; operation.addEventListener(ResultEvent.RESULT, onResultHandler, false, 0, true); operation.addEventListener(FaultEvent.FAULT, onFaultHandler, false, 0, true); operation.resultFormat="object"; websvc.operations = [operation]; operation.send(); Once in the onResultHandler function I have access to the datatable - I then want to grab the column names. The following code outputs my column names: for each (var tcolumn:Object in datatable.Columns){trace('Column:'+tcolumn);} This works ok, but the column names are encoded, so a column name that is actually "1-9" is output as "_x005B_1-9_x005D_" Anyone know the best way to decode the column name? I could replace all the encoding strings, but surely there is a better way? Thanks

    Read the article

  • .NET custom form designer: How to implement IMenuCommandService?

    - by jonny
    I've got a report form designer written long ago for a database project. It used a lot of winapi magic hence i was forced to rewrite some parts 'in proper way'. Thanks to some articles from MSDN magazine (here and here) and CodeProject i was able to implement designer surface, toolbox and undo/redo engine. Every resource i discovered on the topic so far is a bit outdated. Can you point to fresh/comprehensive article? Code from article mentioned above seems not working. MenuCommandService.ShowContextMenu is called but nothing appears since there aren't any DesignerVerbs in globalVerbs collection. Should i add 'standard' ones, corresponded to designer actions such as cut/paste, manually? If yes, how can i accomplish this?

    Read the article

  • Visual studio winform designer shows design errors as text rather than html

    - by Miki Watts
    All of the sudden, visual studio displays designer errors as plain html text, for example: <DIV id="div1" class="ErrorStyle" width="100%"><span style="font-weight: 600"><br>Object reference not set to an instance of an object. </span><br><a href="" instead of displaying the usual html formatted. I haven't been able to find anything similar to it on google. Before getting this problem, when I tried opening the winform designer, I would get the run/save/cancel dialog of internet explorer for a .tmp file, instead of the designer window. That went away when I found out that I had notepad assigned to the .tmp file type and removed that. Any ideas how to fix this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >