.NETGURU
ASPFriends.com 'aspngdata' list
Up to: Discussion Lists

  • RSS Syndication
  • Latest Discussions Archive
    DataSet Questions (5 replies)
    ASPFriends.com 'aspngdata' list
    I have created a dataset that represents about 11 database tables and their relationships. I've then generated a .cs class to access the dataset. I've wrapped the dataset class with a data access class that encapsulates and provides a level of abstraction. Its worked great for selects, but I'm having trouble doing updates. Specifically, I'm trying to use a command builder to generate insert, updat...
    Dyanamic HTML out of a Database (2 replies)
    ASPFriends.com 'aspngdata' list
    We have a subscription service that reads html stored in a table for things (email content) such as Welcome Messages, Opt Out, Passwords, etc., and I need to be able to dynamically insert things such as the users email address etc. when I send it. I have already gone down the path of just putting made up fields in the html like: [[usersemail]] and doing a replace on it when I am formatting the ema...
    Persisting datasets using viewstates and xml (still get error) (2 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngdatagridrepeaterdatalist] to [aspngdata] by Devin dmrader@sseinc.com If I change the code to that below, I still get the following error for the assignment statement ds.ReadXml(sr); Value null was found where an instance of an object was required ************** ds new DataSet(); if (ViewState["Hello"] null) { oleDa.Fill(ds, "customers"); string myXml ds.GetXml(); //put xml from da...
    Create Adapter From Strongly Typed DataSet (2 replies)
    ASPFriends.com 'aspngdata' list
    I have a strongly typed, heirarchal dataset that I want to update thru an adapter. Is there an easy way to generate an adapter or class that can do that? Andy Smith Keyboard Jockey #3a7 2.78.1
    bind data to dropdown list (2 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [ngfx oracle] to [aspngdata] by Tim Musschoot Tim.musschoot@rug.ac.be Can someone help me understand why this code produces 6 rows of: option value "System.Data.DataRowView" System.Data.DataRowView /option instead of the actual values I'm looking for? The number of these returned appears to reflect the actual number of records in the expected recordset, but this isn't what I wanted to s...
    Datagrid Edit Template Column (3 replies)
    ASPFriends.com 'aspngdata' list
    Hi All, I want to attach a confirmation dialog with a delete link in the datagrid. ItemTemplate asp:LinkButton id "cmdDel" Text "Delete" CommandName "Delete" Runat "server" /asp:LinkButton /ItemTemplate EditItemTemplate asp:LinkButton id "cmdDel2" Text "Delete" CommandName "Delete" Runat "server" /asp:LinkButton /EditItemTemplate I did it using the ItemDataBound event of the datagrid. lnkDelete (L...
    Queries on related tables with ADO.net (2 replies)
    ASPFriends.com 'aspngdata' list
    Hi, We have just moved beyond the world of flat tables with a survey application that has 3 tables that are related as such: QuestionTable QuestionID QuestionName AnswersTable QuestionID UserID UsersAnswer The problem is that I now need to do things to this data and am having problems thinking about the data and reporting on it as the queries will be no doubt a bit more complex. Also we have needs...
    Fill dropdown with dataset items (2 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Tim Musschoot Tim.musschoot@rug.ac.be Hi I am binding a html drop down list to one typed dataset that I fill somewhere else. I call the fillddnParts() in the onload event of my page. I have the html control named ddnParts in the aspx page with the directive runat server. Is there something else that I must Do. protected System.Web.UI.HtmlControls.Html...
    IsDefined (4 replies)
    ASPFriends.com 'aspngdata' list
    Anyone out there that knows Coldfusion as well, I need the .net equivalent. I'm trying to read from a objDataReader4.Item("myName") and it says there's no data there. I think I need to do an equivalent of IsDefined("") around it. Anyone know? Mike Collins *********************************************************************** NOTICE: This e mail message and all attachments transmitted with it may ...
    records (3 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Tim Musschoot Tim.Musschoot@rug.ac.be hi how do i get the number of records returned by a query in asp and ouput the result: eg. query returned 50 records ? thanks eoghan
    data set merge (5 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [ngfx sqlclient] to [aspngdata] by Yannick Smits dotnet@stepcompany.com WHen I do a merge of two datasets with the same table in each of them I get the result of the orginal dataset. Ok let me expline dataset1.table1 has three fields id,name,state dataset2.table1 has three fields id,name,state now I want to merge dataset2 into data set1 dataset2.merge(dataset1) now the values for datase...
    XmlNodeList to DataSet, DataGrid, DataBind, etc. (2 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Michiel van Otegem mvo@mail.aspnl.com I had such as hard time looking for a good XmlNodeList to DataBind sample that I decided to publish my findings in case anyone runs into the same problem I did, here ya go ;) Dim xNodeList As XmlNodeList "Your XmlNodeList Here!" Dim ds As DataSet New DataSet() Dim xReader As XmlTextReader For x 0 To xNodeList.Coun...
    Can't connect to remote SQLServer FROM .NET? (5 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Yannick Smits dotnet@stepcompany.com Hi all: I have a really pressing issue we've been struggling with here. We have a .NET application. It connects to a database on OurPC1. When the application itself is running on OurPC1, it connects to the SQLServer just fine. However if we run a build of the same application on OurPC2, it cannot connect find SQLSe...
    SQL Query multiple table join (3 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Michiel van Otegem mvo@mail.aspnl.com Can someone tell me what is wrong with this in ASP.net? I keep getting an error "Incorrect syntax near 'dc'." Note: all of the first Select statement line is on one line, which is why I don't have any & in there. "An unhandled exception occurred during the execution of the current web request. Please review the st...
    Are records locked during update, insert and delete (4 replies)
    ASPFriends.com 'aspngdata' list
    ARe records locked during inserts, updates and deletes ? I know that they are if I put them inside transactions, but are they if I don't ?? Also, what happens if the two users try to lock the same record at the same time. Is it first come first serve, with the later one waiting, or is an exception thrown. If so, what exception is thrown ?? Does anyone have any information on this ??? Is it always ...
    are timestamp columns automatically updated ? (2 replies)
    ASPFriends.com 'aspngdata' list
    Are timestamp columns automatically updated or do I need to create my own trigger events. Does anyone have links to articles on how to manipulate timestamp columns to implement optimistic concurrency ? NextPart 000 0009 01C226AC.EF197A90
    SV: I am trying to convert my VB script to C# here are the line that are the culprit (2 replies)
    ASPFriends.com 'aspngdata' list
    I am by no means a C# expert, but : 1: Aren't you always supposed to use square brackets in C# parameterSearch SqlParameter New SqlParameter["@Search", SqlDbType.NVarChar, 255)]; and also, I though that using the semicolon after each statement was also standard procedure. Regards/Halsningar Andre Colbiornsen Sonnenburg Communications Bergsgatan 3, SE 211 54 Malmö Sweden Tel.: 46 (0)40 97 78 8...
    I am trying to convert my VB script to C# here are the line that are the culprit (6 replies)
    ASPFriends.com 'aspngdata' list
    I am trying to convert my VB script to C# here are the line that are the culprit // in VB the failing line was like this // Dim parameterSearch As SqlParameter New SqlParameter("@Search", SqlDbType.NVarChar, 255) parameterSearch SqlParameter New SqlParameter("@Search", SqlDbType.NVarChar, 255) parameterSearch.Value Request.Params("txtSearch"); myCommand.Parameters.Add(parameterPortalID); Descripti...
    Is the ListBox, ComboBox bindable in ASP? (2 replies)
    ASPFriends.com 'aspngdata' list
    I tried the simple examples of binding a SqlDataReader to a ListBox control on an ASP page as illustrated in the doc. However, I get a list full of "System.Data.Common.DbDataRecord". Most of the examples use DataAdapters and Fill to construct DataSets, but I was lead to believe that the DataReader was bindable in an ASP Web Application. The code works fine with the DataGrid control. Bug? Mydatarea...
    Parent / Child Dataset Update. Is there an easier Way? (3 replies)
    ASPFriends.com 'aspngdata' list
    Hi, This question boils down to, "Is ado.net smart enough to use scope identity and automatically write code to handle parent/child updates?" that said, I have a screen where Parent rows can be dynamically added to a dataset, then after the parent row is added child's can be attached to that row. (before saving to the db) Parent Row Child Child Child I set the ParentID column AutoIncrement True, A...
    Want to know performance of CommandType missing on SP. (4 replies)
    ASPFriends.com 'aspngdata' list
    Can anybody tell me what the difference between these two methods are (missing the command type)? I was helping somebody and realized that in the "old" days of asp3, SQL Server recognizes you are running a stored procedure anyway. a) MyCommand New SqlDataAdapter("spMySecretSP", MyConnection) MyCommand.SelectCommand.CommandType CommandType.StoredProcedure DS new DataSet() MyCommand.Fill(DS, "Produc...
    DataTable Index (2 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngstart] to [aspngdata] by Marcie Jones marciejones@yahoo.com Hi All, how can i Add an index to created datatable inorder to increase the performance when selecting from the table dtblSpringNet New DataTable() dtblSpringNet.Columns.Add(New DataColumn("Date", GetType(DateTime))) dstSpringNet.Tables.Add(dtblSpringNet) If dstSpringNet.Tables(1).Select("Date #" & drowAppointment("date")...
    unbinding the drop down list (2 replies)
    ASPFriends.com 'aspngdata' list
    I have two dropdown list. When I select a value in one the other one changes. I am using onselectedindex "action here()" On the first drop down I have added an extra list called "select a category" then to my sub "action here()" I have added sub action here() If cat id.SelectedItem.Value "Select a category" Then ... (Bind the second drop down with values) End If This works fine If I am selecting a...
    How to make multiple queries with the same connection (5 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Tony Stark IronMan@aspelite.com Hello! Can anyone of you tell me please how can make multiple queries with the same connection object? I open the connection, and then open a DataReader. After that, i need to make another query but i cannot open another data reader because there is the first one still associated with the connection, and i cannot close ...
    Typed dataset (2 replies)
    ASPFriends.com 'aspngdata' list
    Copied from [aspngxml] to [aspngdata] by Michiel van Otegem mvo@mail.aspnl.com I have a typed dataset called dsPart. When I use a dataadapter to fill the dataset with data from a sql database I get a xml representation diferent that the one that I get when I fill the dataset with the method dsPartAux.Part.AddPartRow("x1", "memoria Ram", 60, false, "123") when filling with the dataadapter I get thi...
    vijjay chauhan (2 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Tony Stark IronMan@aspelite.com hello sir, i am having a problem in inserting and retriving image to and from the database. so i want to kowe the classes to implement the same. other wise and how can i extract the image name so that i can insert only the name of image in to the database image feild into the table. need your help regarding the same, an...
    ExecuteScalar (5 replies)
    ASPFriends.com 'aspngdata' list
    Where is a good complete code sample for use of ExecuteScalar? I've found a few articles online but none that show complete (cut & paste workable) code. I know Charles had a code sample once but I can't find it anymore. Thanks, ~Brad Kingsley Microsoft MVP ASP Windows 2000 MCSE http://www.orcsweb.com/ Powerful Web Hosting Solutions #1 in Service and Support [This E mail scanned for viruses by Decl...
    Datareader.Read() & EOF (8 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Tony Stark IronMan@aspelite.com Hi From what i can gather While myReader.Read() 'do stuff End While Is fine for looping through a datareader. But unlike what ive read in past messages. If Not myReader.Read() Then 'End off file Else 'Do something End If Is not a suitable replacment for classic ASPs IF recordset.EOF Then 'End of file Else 'Do something ...
    GetChars()? (5 replies)
    ASPFriends.com 'aspngdata' list
    Hi folks! I have been having some difficulty working with a large text field in my SQL Server database. The field could be any length and, in a few cases, is extremely large. It seems that the connection keeps cutting the length of the field, when returned, to 8000 chars. I've been reading up some, and since I can't use GetChunk() in .NET, I think I should do something with commandbehavior.Sequent...
    Retrieving ID after Inserting a record. (10 replies)
    ASPFriends.com 'aspngdata' list
    I need to get the ID (from a field) of a new record from a database after I call the ExecuteNonQuery method. How can I get it with out opening the dataset again. Thanks.. Hector Caban 20 A , Net , MCP SB, MCSA, MCSE, MCT, CCNA
    Updating a database from ASP.NET (5 replies)
    ASPFriends.com 'aspngdata' list
    When programming in asp, sometimes I would update a field 20 with out using SQL. For Example : If Request.QueryString("chkActive") 3D "1" Then rs("Active") 3D True Else rs("Active") 3D False End If rs.update() rs.close() Can I do the samething with ADO.NET or do I have to always 20 use execute a SQL statement ? Thanks for your help Hector Caban 20 A , Net , MCP SB, MCSA, MCSE, MCT, CCNA
    IIf Function (5 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by devin devinr@drone interactive.com Hi I'm using the IIf funtion to check whether a value for insertion into an SQL Server DB is NULL. It seems like the False part is being evaluated even if the test expression is true. Code is as follows: IIf(IsDBNull(dt.Rows(I)("TRAVDATE")), "NULL", cString(Format(dt.Rows(I)("TRAVDATE"), "dd MMM yyyy HH:MM"))) If dt....
    which is faster way to populate this DataTable? (3 replies)
    ASPFriends.com 'aspngdata' list
    Which is the faster, more efficient way to populate this DataTable? 1. Call my DAL method that returns a DataTable? myDataSet.Tables["Table1"] SqlService.ExecSPRetDT("mySp", "Table1"); 2. Call my DAL method that returns a DataAdapter, and Fill the Table? SqlDataAdapter da SqlService.ExecSPRetDA("mySp"); da.Fill(myDataSet, "Table1"); TIA, Francesco Chat with friends online, try MSN Messenger: http:...
    Read DBNull from DataReader (6 replies)
    ASPFriends.com 'aspngdata' list
    V2hlbiBJIHRyeSB0byByZWFkIGEgcmVjb3JkIGZyb20gYSBEYXRhUmVhZGVyLCBvbmUgb2YgdGhl IGZpZWxkcyBvbiBzb21lIHJlY29yZHMgYXJlIE51bGwsIGJ1dCBJIGdldCBhIGNhc3QgdHlwZSBl cnJvciBzYXlpbmcgdGhhdCBpdCBjYW4ndCBjYXN0IERCTnVsbCB0eXBlLiAgSG93IHdvdWxkIEkg Z2V0IGFyb3VuZCB0aGlzIHByb2JsZW0sIHRvIGNoZWNrIGlmIHRoZSBmaWVsZCBpcyBEQk51bGw/ IA0KDQpUaGFua3MuDQoNCkRleWxvIFdvbw0KDQo
    Selecting Rows From A Dataset (3 replies)
    ASPFriends.com 'aspngdata' list
    Hi, I have a cached dataset populated from a database using SqlDataAdapter. I just want to ask how will I select rows from my cached dataset because i dont wanna connect to my database again and select records form there since i already have the records in my dataset. I tried using the Select method of DataTable but it only works for a single filterExpression(e.g "Date 01/01/2001"). What i want is...
    error when trying to assign to a DataTable... (2 replies)
    ASPFriends.com 'aspngdata' list
    I get an error when I try to return a DT from a DAL method directly to a DT in a DS... Code: myDataSet.Tables["Table1"] SqlService.ExecSPRetDT("mySp", "Table1"); Error: Property or indexer 'System.Data.DataTableCollection.this[string]' cannot be assigned to it is read only. TIA, Francesco Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
    best way to get a single piece of data out of a DataSet? (7 replies)
    ASPFriends.com 'aspngdata' list
    I have a set of 10 DataTables in a DataSet, and I need to get one column out of one row out of one table in the DataSet. I have tried the code below but I get an error. Any help? TIA, Francesco Error: Object reference not set to an instance of an object, line 235 Code: 234: DataRow dr; 235: dr newVisitor.MemberData.Tables["PersonAddress"].Rows[0]; 236: Session["test"] dr["profile name"].ToString()...
    Import access table into sql server (4 replies)
    ASPFriends.com 'aspngdata' list
    Hi how to import ms access table to sql server database using ado.net? Vojin Lekovic IT Developer KPMG Consulting Barents Group Internet Crna Gora
    ADO vs ADO.NET Performance Comparison (5 replies, VIP)
    ASPFriends.com 'aspngdata' list
    Does anyone know of some published statistics comparing the performance of ADO and ADO.NET? Dan Green [ http://dotnetdan.com putting the dan in .net ]
    Reading delimited text files with ADO.NET (13 replies)
    ASPFriends.com 'aspngdata' list
    Hi all, I'm looking for a quick way to read a tab delimited text file into a dataset. I've looked for information on this everywhere and all I can find is something related to setting up a DSN (which doesn't work for me). Is there an easy way, outside of writing code to read each value intot he dataset one by one, to load a delimited text file into a dataset? Has anyone else had any success doing ...
    can't get multiple result sets into a DataSet... (2 replies)
    ASPFriends.com 'aspngdata' list
    I am using the code below to try to get a handful of result sets (returned from a single SQL 7.0 sproc) into distinct tables in a DataSet. I get an error when the Fill() tries to happen: Value cannot be null. Parameter name: dataSet. The result sets being returned are not simple SELECT * FROM PersonEmail queries, they are complex JOINS, so maybe a table name is not being passed that maps to the so...
    DataReader / DataTable question... (6 replies)
    ASPFriends.com 'aspngdata' list
    I have a SQL sproc that returns 10 result sets. I grab it into a DataReader. I want to loop through the result sets, and for each one, dump the result set contents into a separate DataTable. I can't find a DataReader equivalent to the DataAdapter Fill() method. Can someone show me how this can be done? TIA, Francesco while (dr.read()) { // loop through result sets and dump into DataTables } Join t...
    SV: RE: Nulls (2 replies)
    ASPFriends.com 'aspngdata' list
    How can one check for nulls in a dataset ( it will always be a dataset 20 with 20 one column and one row) and if there is a null then exit sub else carry 20 on 20 with the rest of my code.... 20 20 20 Any ideas 20 20 C 20 20 20 This email and any files transmitted are 20 confidential and intended solely for the 20 use of the individual or entity to which 20 they are addressed, whose privacy 20 sho...
    Nulls (12 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngfreeforall] to [aspngdata] by Dana Coffey denigma@bellsouth.net !DOCTYPE HTML PUBLIC " //W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP EQUIV 3D"Content Type" CONTENT 3D"text/html; charset 3Dus ascii" META NAME 3D"Generator" CONTENT 3D"MS Exchange Server version 5.5.2652.35" TITLE Nulls /TITLE /HEAD BODY P FONT SIZE 3D2 Hi all, /FONT /P P FONT SIZE 3D2 If I want to insert a null to th...
    Error in Compilation of Beta 2 Web Services in .NET Framework V1. (2 replies, VIP)
    ASPFriends.com 'aspngdata' list
    Please help I could not compile my old web service file of Beta 2 in Version 1 of .NET framework. I have the following code in my .asmx file %@ WebService Language "C#" Class "Item" % %@ Assembly name "System.EnterpriseServices" % using System; using System.Data; using System.Data.SqlClient; using System.Web.Services; using System.Web.Util; using System.EnterpriseServices; public class Item : WebS...
    dataset incorrect about HasChanges (2 replies)
    ASPFriends.com 'aspngdata' list
    ok, I have a dataset of new,ready to insert relational data in several tables. My code to insert it runs thru the dataset and calls adapter.Update on each table in a parent first fashion. the first table is inserting correctly, and my keys are updating and cascading correctly... but after the first run thru the loop, the dataset claims there are no more changes when every other table has non inser...
    Blob Field (2 replies)
    ASPFriends.com 'aspngdata' list
    !DOCTYPE HTML PUBLIC " //W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP EQUIV 3D"Content Type" CONTENT 3D"text/html; charset 3Dus ascii" META NAME 3D"Generator" CONTENT 3D"MS Exchange Server version 5.5.2652.35" TITLE Blob Field /TITLE /HEAD BODY P FONT SIZE 3D2 How does one specify that you are doing a query against a blob field a normal Select query seems only to bring part of the text back and not ...
    ADO.Net (9 replies)
    ASPFriends.com 'aspngdata' list
    Moved from [aspngibuyspy] to [aspngdata] by Cain Marco juggernaut@aspelite.com Under ASP using Ado we could use the "rs.filter", that could be used to select a record and than se the result of the next column. ex: rs.filter "ID 17" writetext rs("text") How can I do the same on ASP.NET? Thanks
    Loading schema (4 replies)
    ASPFriends.com 'aspngdata' list
    Hi All, How do I get a datable schema without loading all the data from the database? I need to do this for both OleDb and Sql. Specifically, I just need the column names of the resulting datatable. I have a function that gets passed some sql or a stored procedure and returns a datatable. I'd like to provide the caller the capability to only return an empty datatable ( really, just the table colum...
    Creating Xml Schema from a dataset (3 replies)
    ASPFriends.com 'aspngdata' list
    Hi, If I load an XML file (without a schema ) into a dataset can a general a schema and write it back out to the xml file ? If so, can I then use that schema to populate that data using the schema into a Sql Server tables. Regards, Paul
    Visit the archive for messages from this site.
  • September 2001 (11 items)
  • October 2001 (77 items)
  • November 2001 (58 items)
  • December 2001 (46 items)
  • January 2002 (63 items)
  • February 2002 (37 items)
  • March 2002 (47 items)
  • April 2002 (51 items)
  • May 2002 (44 items)
  • June 2002 (24 items)
  • July 2002 (15 items)
  • August 2002 (6 items)
  • June 2004 (1 item)
    Ad


    Need Dot Net Interview Questions?
    Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
    .Net Projects
    Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
    Free .net Help
    Commission ExamGuru, Inc. and his team for your next bespoke software project
    FogBUGZ
    The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
    Awesome Tools
    If you don't know about these, you're missing out... IT Certification Questions
    IT Interview Questions
    Free Oracle 10g Training
    MCSE Boortcamp
    Cisco Study Guides
    Cheap Study Guides
    Exact Questions
    Dot Net Interview Questions
    Oracle OCP
    Cheap Travel
    Designer Perfumes - Wholesale Prices
    Free Programming Tutorials
     
    ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
     Copyright © ExamGuru, Inc. 2001-2006
    Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification