Groups | Blog | Home


Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > dotnet ado.net > december 2007

Filter by week: 1 2 3 4 5

LIMIT in Queries
Posted by Jonathan Wood at 12/31/2007 9:37:46 AM
Does MS SQL support LIMIT? I'd like to implement paging at the query level. Examples of this in a book I have involve temporary tables and the like. Then I read something about LIMIT. Would LIMIT be the best way to implement paging? I'm using MS SQL Express on my development computer. I...more >>


Unhandled exception
Posted by nyoussef at 12/31/2007 7:13:01 AM
When I run below sample code I get the error message "attempted to read write protected memory. This is often an indication that other memory is corrupt" if the records reteived from the DB exceeds 300 or 400 records: 'VB libraries Imports EX_MaDll 'System libraries Imports System.IO I...more >>

Questions About Relationships
Posted by Jonathan Wood at 12/30/2007 4:40:59 PM
I'm using the ASP.NET membership routines but had to create some of my own tables to store additional user information (profiles won't work for me). So far, so good. But it seems like I should really create a relationship between the membership table aspnet_Membership and my own table in orde...more >>

UDF in LINQ: "Stored Procedures cannot be used inside queries"
Posted by Tekton at 12/28/2007 11:07:00 AM
Hi group, I've a question about calling stored procedures in LINQ queries. Here's my scenario: I have some CLR user-defined functions in a SQL Server 2005 database for custom string matching, e.g. using regular expressions. Say one of them is called RegexMatch and accepts 3 parameters: the tex...more >>

How to restrict any select to a subset?
Posted by David Thielen at 12/26/2007 6:11:01 PM
Hi; We are designing a web application where multiple companies can use it. We want to give every company access to their data, and only their data. So if both Oracle and Microsoft are using the system, only Microsoft can see the Microsoft data and only Oracle can see the Oracle data. Bu...more >>

Best Practices for Data Access
Posted by KA Kueh at 12/26/2007 10:12:02 AM
Dear all, I need to design an smart client application that can run on mulitple and plugable backend like MS SQL, Oracle or MySQL. Also the smart client is accessing the database from the internet. What is the best approach? Thanks. Regards, Kueh. ...more >>

How to read XML in vb.net
Posted by John at 12/25/2007 4:19:24 AM
Hi I have the below XML file. How can I read each tag and its attribute in vb.net? Many Thanks Regards <Configuration> <section name="Clients" type="Company-Contacts"> <mastertable name ="tblClients" primarykey="tblclients.id" /> <childtable name="tblClientContacts" foreign...more >>

How can I read the Binary data from DataBase
Posted by Husam at 12/24/2007 11:39:01 AM
Hi EveryBody: I have probelm that I hung with for three weeks, My problem is I want to read Binary data from database. I will told you what I did : first I declear an array byte and I cast the value in the database to byte after that I use memory stream then I read the value by using metho...more >>



Looking for Comments on Code
Posted by Jonathan Wood at 12/23/2007 7:18:51 PM
I would appreciate any comments on the following code--particularly criticism that is constructive. It is some of my first data-layer code. I felt these helper routines would be helpful in their own data-layer class. There are a few issues that came up, mostly related to using an SqlDataRea...more >>

DBF Import Crashes .NET APP and no error log whatsoever
Posted by Henok Girma at 12/22/2007 8:17:25 AM
Hello, I have the following code to connect and query a dbf file. string cnn = @"Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=C:\DBF;exclusive=yes"; OdbcConnection odbcCnn = new OdbcConnection(cnn); odbcCnn.Open(); OdbcCommand odbcCmd = odbcCnn.CreateCommand(); odbcCmd.CommandT...more >>

A question on Objectdatasource???
Posted by Esha at 12/21/2007 9:08:02 AM
Scenario : In a single webform, I have bill data(master data like billno,date,remarks.. ) and bill details(multiple entries in a grid like item details). While saving data to it should be stored in Billdata(Bill no-primarykey) , Billdetails(Bill no-foreignkey) tables accordingly. For this sce...more >>

How to read MySQL data table from MS SQL?
Posted by Alexander Vasilevsky at 12/19/2007 3:50:53 PM
How to read MySQL data table from MS SQL? http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount ...more >>

UPDATE Statement without WHERE
Posted by Jonathan Wood at 12/18/2007 7:32:34 PM
I want to store some application-wide data in my database. The table that stores this will store the different data in each field, and there will only need to be one record. Since there will only be one record, I haven't bothered to add a key (primary or otherwise). This seems to work fi...more >>

TextBox bound to a numeric value does not allow nulls
Posted by Emil at 12/18/2007 2:48:21 PM
Hi, I have a textbox bounded thru a bindingsource to a dataset. In the dataset the bounded column allows nulls, but if i try to delete the value from the textbox and move the focus, the focus does not move. The textbox does not allow null. (The column in the table in the database allows nulls...more >>

Aggregate column uses defaultview?
Posted by benji at 12/18/2007 11:55:01 AM
Hi, I have two tables related to eachother, and one table has an expression-based column that states "SUM(Child.Price)". Am I able to adjust the child table's default view, and expect that the result of the SUM will be affected? Is there any extra action I need to take to trigger a "refresh...more >>

Batch updates on generated TableAdapters throws InvalidOperation
Posted by Some Bloke at 12/18/2007 4:44:33 AM
Hi, I'm trying to write a data layer for to persist regularly occuring stats to a database using ADO.NET by collecting a few records then updating the database in batches. I've got a Dataset that is generated with MSDataSetGenerator that I add rows to then pass to the Update method of the g...more >>

Select statement after the sqldataadapter Update statement
Posted by Igor at 12/17/2007 10:07:01 AM
How can I modify the Select statement after the Update statement in sqldataadapter ADO 2.0? (add columns) -- Igor...more >>

Schema-Typed Dataset doesn't preserve nested tables order
Posted by sunstormlabs@gmail.com at 12/16/2007 6:47:16 PM
Hello, I'm having trouble with schema-bound XML output from a dataset, in .NET 2.0. Here's an example bit of XML I'm trying to create using a dataset: <TestSchema xmlns="http://tempuri.org/TestSchema.xsd"> <Customer> <Name>Mr. Foo</Name> <Company>Foo Inc.</Company> <Billing...more >>

custom column in VS2008 DataSet
Posted by Cartoper at 12/16/2007 2:36:32 PM
I am working on my first VS2008 project and using DataSet's, which I am not super familar with. I have a user table in the data set that has a first name and last name, I would like to add a computed field/ column that is "<fname> <last name>". In .Net 3.5, what is the best way to do this?...more >>

Export a Table to XML from SQL Server
Posted by skneife@gmail.com at 12/16/2007 3:31:20 AM
Is there a way to Export a Table to XML from SQL Server express ? Thanks for help. Sam...more >>

Multiuser Embedded Database Recommendations?
Posted by Bruce at 12/15/2007 1:14:08 PM
I've finally decided to port a Win32 application written in Delphi to C#. The program used an embedded database (DBISAM) that handled multiple users well through file locking, and I'm looking for something similiar for ADO.NET. I would really prefer not to go client-server. Can anyone make a ...more >>

Would you stop for a moment?!
Posted by aassime abdellatif at 12/15/2007 7:27:49 AM
Excuse me!! Would you stop for a moment?! O...man...Haven't you thought-one day- about yourself ? Who has made it? Have you seen a design which hasn't a designer ?! Have you seen a wonderful,delicate work without a worker ?! It's you and the whole universe!.. Who has made them all ?!! You kn...more >>

michael lalonde
Posted by Mike Lalonde at 12/14/2007 9:33:54 PM
Davey Simmons has bad teeth. Why doesn't he brush? Michael Lalonde saw a movie made by an axe murderer in Tokalue Michael Lalonde went swimming with a baby boy in an icy cave and got locked in prison feeling very foolish and banged his head on a wall. Then Michael Lalonde ran around like a lun...more >>

Way OT: What is it?
Posted by John at 12/14/2007 12:27:24 AM
Hi I have received below from someone. ..- .-. . | -.-- --- ..- | .- -. | .. -.. .. --- - | This has nothing to do with dot net but I thought a lot of intelligent people come here and may be able to help me figure out what it is. Any help would be appreciated. Many Thanks Regards ...more >>

How gets SQL-code from MS Accesss
Posted by Alexander Vasilevsky at 12/13/2007 6:20:08 PM
How gets SQL-code from MS Accesss? http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount ...more >>

Switching Fill methods
Posted by Lucas Genea at 12/13/2007 1:34:01 PM
Hello, I have a question: I have 2 dropdownlists and I'd like to cascade them. In the begining they show 2 different columns of the same table. Once one of them is picked I'd like to restrict the values of the other one to the selected value of the first. I created(using the ) 2 tableadapters...more >>

Bug with namespaces in XSD.EXE /dataset (C#)
Posted by Marc Durdin at 12/13/2007 3:46:02 AM
I have come across an issue with XSD.exe code generation (in /dataset mode, version 2.0.50727.1432), relating to namespaces. Specifically, certain types are not always consistently prefixed with global::, so if you have a namespace with the name System, the generated code will fail to compile. ...more >>

Transform After WriteXml?
Posted by coconet at 12/12/2007 3:55:47 PM
I have a DataTable with many rows. I use WriteXml to emit to an XmlWriter with an underlying StringWriter to put the final output into a string. I need to massage the XML output now. I don't know if it should be done while the data is in the DataTable, during the XmlWriter writing phase or ...more >>

Automated execution of script from file
Posted by Harlan Messinger at 12/12/2007 1:33:11 PM
Is there a built-in method in ADO.NET for reading a T-SQL script from a file and executing it step-by-step as though it were in a stored procedure?...more >>

LDAP Administrator -- REQUIREMENT !!!!
Posted by netxure@gmail.com at 12/12/2007 9:46:07 AM
Greetings, Hope u r in the best of Health and Spirits!!!!!!!!!! This is Naveen from CSI Consulting with regards to Job Opportunity for you. Position: Ldap Administrator Location: San Diego, CA Duration: 12 months =84=AB Install/Configure/Administer Sun Ldap =84=AB Ldap Security and...more >>

% wildcart problem
Posted by Globetrotter at 12/11/2007 8:20:02 AM
I am new to C# and using VS2008 and SQL 2005. For doing some exercises I have made the following code: string name = tstxtName.Text + "%"; this.taCountry.FillByName(this.dsTest.Country, name); Problem I have is that the % character behaves like there is one ...more >>

SQLDataAdapter Update method?
Posted by Asaf at 12/11/2007 5:09:00 AM
Hi, I have let's say, about 10,000 rows in a DataTable. I am looping with foreach on each row and need to update each and every row with new data. After updating, for each row I am calling MySQLDataAdapter.Update(MyTable) for the row to be updated to my DB. * I know I can call one Upda...more >>

Asynchronous Programming Model & ADO.NET
Posted by JumpingMattFlash at 12/11/2007 2:08:02 AM
I'm trying to execute two queries on a database asynchronously by using the ..NET 2.0 APM. I've created a test harness which executes two queries which take at least ten seconds each. Using the APM I would've expected the page to load in a little over ten seconds, but instead it takes over 30....more >>

Which books on 3.5 recommend?
Posted by Alexander Vasilevsky at 12/10/2007 10:36:30 AM
Which books on 3.5 recommend? http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount ...more >>

SQL reference card
Posted by skneife@gmail.com at 12/9/2007 12:42:51 PM
I am looking for a SQL reference quick card that a allow in one page to know the function list of the langage. Does anyone know that ? sam...more >>

ReadXml() on typed dataset causes InvalidCastException
Posted by Mike at 12/7/2007 6:40:02 AM
Using Microsoft Development Environment 2002 v7.0.9466. In a C# ASP .Net project, we have some typed datasets defined. (inherit from System.Data.DataSet) We call the ReadXml method of our typed dataset to load an XML string into it. I have found that when one particular element is in the ...more >>

Using a DataSet
Posted by Jonathan Wood at 12/6/2007 7:06:31 PM
Okay, so based on previous discussions, I got the message I'm better off using a DataSet over a DataReader object when I want a method to return that object to a caller. Now what? DataReader is not only efficient but is extremely easy to loop through it's content. A DataSet is apparently a ...more >>

Simple Adapter.Update problem
Posted by Brian at 12/6/2007 6:47:35 PM
Hi, I have a typed dataset that is based on a SQL view, so I have added a stored procedure to save the data (that the TableAdapater found and populated). However when I execute "Adapter.Update(DataSet.Tables[0])", absolutely nothing happens - no errors, no sql commands. Is there anything o...more >>

Check if table has LOB columns
Posted by sjoshi at 12/6/2007 1:05:41 PM
I need to check if a table in SQLServer 2005 is made up of one of the LOB columns :image, ntext, text, varchar(max), nvarchar(max), varbinary(max), and xml Currently I'm using SMO with code like this... private bool TableHasLOBColumns(ColumnCollection tableColns) { bool result = false;...more >>

many to many relationship
Posted by Manjree Garg at 12/6/2007 6:30:01 AM
Hi I am developing a Sql Server 2005 database and using ADO.Net to access it in VC++ 2005. Is there some way of defining many-to-many relationship between two tables(e.g. Experiment and SampPrep as one experiment can have many samplePrep amd many experiments can be performed on one sampleP...more >>

Enumerate providers on System / Understanding providers and dataproviders
Posted by Chuck Vance at 12/6/2007 12:39:57 AM
Hi ng, when I use ADO.NET 2.0 System.Data.Common.DbProviderFactories-Class to enumerate the providers it get: Odbc Data Provider OleDb Data Provider OracleClient Data Provider SqlClient Data Provider But how can I get the names used in Connection-String such like "provider=MSDAORA;...". ? ...more >>

How to add new row to dataset's table feilds are bounded
Posted by Murtaza at 12/5/2007 9:06:03 PM
I have written a small programm using vb.net. i used a dataset wich contain only one table. fields are bounded to table of dataset. I want to add new row in such a way that i call newrow function fill tha fielsd and update dataset without crreating datarow object. Is it possible?...more >>

URGENT: ConnectionString for SQLServer db
Posted by Cirene at 12/5/2007 6:33:33 PM
I developed my ASP.NET 2.0 web app using SQL Express. Now I'm moving it to production. On my web server I attached the SQL Express mdf database to a new SQL Server database. The (example) SQL Server settings are: DB Name: rnz_mydb Server IP: sql123.MyHost.com Login ID: rnz_ad...more >>

command timeout - SQL 2005 express - critical customer down
Posted by Darin at 12/5/2007 6:24:10 AM
we have a VB application that we updated on a customer's machine. The customer has SQL 2005 Express (they had MSDE and we had the same error so we upgraded to express ohpeing that would fix the issue). THe software runs fine from the server, but when trying to access it from a client we get: ...more >>

How to read a BLOB from Oracle
Posted by Chuck Vance at 12/4/2007 7:47:24 PM
Hello ng, I try to read a BLOB (HugeBlob) field from oracle 10g database. (dotnet-framework 1.1, 2.0) 1.) I have no chances to install / register third party DLLs because I don't have local admin rights. 2.) When using "System.Data.OracleClient" the Connection fires the exception "Oracle cli...more >>

Event Handling for ColumnChanging
Posted by coconet at 12/4/2007 4:01:03 PM
I have a .NET 2.0 DataTable with a ColumnChanging event. There is code in the event that tests ProposedValue and if it is "a" then the value I want in the column should be "1". The column is Type Int32. Main program (C#) flow is string teststring = "a"; DataRow datarow = mytable.NewRo...more >>

Get back uniqueid?
Posted by benji at 12/4/2007 11:37:00 AM
Hi, I'm using VS2008, and the dataset designer to access my SQL Server 2005 DB. I can insert a row into a table and then call the adapter to update. No problem, except I want to get back the ID field of the newly created row. I've tried the following: DataSet1.CustomersRow myrow = myCus...more >>

empty dataSet
Posted by Toyin at 12/4/2007 4:51:02 AM
hello,when i try to insert a dataSet record into another database table, what i see in the table is null values. i have test this dataset and it contains 1 Row of record but when in perform insert command it inserts null values. pls someone helpl. Also i have difficult in connecting to Microso...more >>

Transactions and ASP.NET Membership
Posted by Jonathan Wood at 12/3/2007 7:58:45 PM
I'm using ASP.NET membership but need to store some additional data associated with users in my own database tables. (Profiles don't look like a good fit for me.) I'd really like to use transactions to ensure all tables get updates correctly. I don't suppose there is any way to have a tr...more >>

Linq: #Temp tables in SPROCS do not have return values in generated methods
Posted by R. K. Wijayaratne at 12/3/2007 4:07:18 PM
Linq: #Temp tables in SPROCS do not have return values in generated methods Hi everyone, I have a SPROC which selects records into a MSSQL #temp table and then selects the records from that. I drag this SPROC onto the right-hand pane of the DBML diagram, but the method that gets generated f...more >>


DevelopmentNow Blog