ado.net

Can not connect to ASE-Sybase Using ADO.NET Data Provider

I am working on ASP.NET application. I try to connect to database in Adaptive Server Enterprise using Sybase.Data.AseClient dll. Connection string that I am using is 'Data Source='host';Port='5000';UID='user';PWD='password';Database='database';'. When Application tries to connect to database exception is thrown. 'Client can not establish...

Alternatives to typed datasets?

I can add a stored procedure to a dataset and handle the data manipulation. Wanted to know if there are any other ways through which on the basis of stored procedure result sets, I can handle data in the BAL, like dynamically generating business objects or something else? ...

Has anyone seen a dataset break after adding a new tableadapter?

I have a dataset in a project which I'm using to provide databinding for winforms controls. Everything has been working fine (tableadapters with select, insert, update, delete methods provided by stored procedures) until I added another tableadapter this morning. Since adding it, every tableadapter in the dataset broke. My project now...

Problem using oledb datatypes to write data to excel sheet

hi everyone, I am trying insert some data into excel sheet using oledb dataadapter which is obtained from MYSQL Db.This data obtained from mysql db contains very long texts whose datatypes in MYSQL have been defined as(Varchar(1023),Text,Longtext etc).When I try to pass these to the oledb Dataadapter I tried to use oledb.VarWChar,oledb....

Creating entities from stored procedures which have dynamic sql

I have a stored procedure which uses a couple of tables and creates a cross-tab result set. For creating the cross-tab result set I am using CASE statements which are dynamically generated on basis of records in a table. Is it possible to generate an entity from this SP using ADO.NET Entity framework? Cuz each time I try Get Column Info...

ADO.NET Connection String

I have a SQL Server 2008 database that uses a default schema called "Arxame". How do I specify or change the default schema from "dbo" to "Arxame" in my connection string? I'm using C# and ADO.NET. ...

getting Stream in and out of VarBinary(MAX) column? (SQL Server)

I have some data that I am serializing. I need to save and restore this from a VarBinary column using ADO.NET (also using Enterprise Library) under .Net 3.5 (not 4.0 yet). The only interface I seem to be able to find and get working is by using a byte[]. This requires allocating a large array to do the transfer. It seems impossible t...

how to update an entity in Entity Framework 4 .NET

my code is something like this: public class Program { [STAThread] static void main() { DataAccessClass dal = new DataAccessClass(); List<Person> list = dal.GetPersons(); Person p = list[0]; p.LastName = "Changed!"; dal.Update(p); } } public class DataAccessClass { public static List<Person> GetPersons() { MyDBEntitie...

I need a workaround for Excel Guessing Data Types problem

Hi All, I'm creating a utility to import data from Excel to Oracle database, I have a fixed template for the excel file, Now, when I'm trying to import the data by Jet provider and ADO.Net - Ole connection tools, I found the following problem: there're some columns haven't been imported because there are mixed data types in their colu...

Entity Framework 4: Eager Loading (Include) with filters using Self Tracking Entities

I have a solution where I have created self tracking entities using the RTM templates. I have split the entities and context between 2 projects so that I can reuse the type definitions as I plan to run client/server via WCF. One of my service methods is required to return a graph of "Product" objects with child objects of "ProductSku" a...

loosely typed dataset assuming data-types

Scenario Having a table with one of the column varchar(20). Column mostly contains integer values but we haven't restricted the user. 90% of users enter 50, but there are 5% users who enter 50 Units. Defined an in code query as follows qry = select coalesc(CONVERT(Varchar(20),column1),'') from table1 Have got c# code to populate data...

What is ADO.NET

Hi, I puzzled with understanding ADO.NET, after reading several articles I do not have a clear idea what is all about. Please notice I am very new at developing. - What is ADO.NET? - ADO.NET could be associated with SQL STORED PROCEDURES or are different things? Thanks guys! ...

Entity Framework - Expecting non-empty string for 'providerInvariantName' parameter.

Ok, this may not be related to EF. I am trying to use the code-first feature and following is what I wrote:- var modelBuilder = new ModelBuilder(); var model = modelBuilder.CreateModel(); using (AddressBook context = new AddressBook(model)) { var contact = new Contact {...

ADO.net how to start

For the last 3 hours I've been trying to figure out how ADO.NET works with no success. Could someone point me at a great tutorial or somethign similar? I am trying to build a DB from scratch and working with it in my WPF program. I have worked before with JDBC and sqlite but I didn't find a tutorial from zero to a DB where I can connec...

Wrong object added to ObjectContext (_addedEntityStore)

I have a wizard in my asp.net MVC application which is built upon this SoG - RESTFUL wizard guide. In order to understand the problem I will first explain the situation below. For this I will use a dummy situation, we try to create a person with an address. Again, this is just a dummy situation! The situation At start, the object (pe...

how to start using db in .NET platform

i want the most simple example from scratch how to open new db populate it with one table connect and open it to simple select query I have been looking for sothing relvant in the last 2 days please help me i neede just the basic I am using visual studio 2008/2010 and i know mysql but dont know how to use VS for DB I would p...

Maximum stored procedure, function, trigger, or view nesting level exceeded in Visual Studio (ado.net) but not in SQL server.

I have a problem with a recursive SQL function. The original problem is that I've got a list of employees, each of them has various trainings. Each of these trainings has some pre requirements. For example to have your Class 1 drivers license you must have your Class 5. If I remove the Class 5 I need to check disable the Class 1. Now as...

Help With TableAdapters And DataTables

I created a new table adapter inside a dataset.xsd. In the tableAdapter I created an update query to do a simple update on that table Update table set c=@c where d=@d AND e=@e I tested the query in the dataset and it worked. Now I am trying to use the query but it wont update the database or the datatable. What am I missing?? Also ...

Simultaneous connections to SQL Server using the same name and password. Is there any problem with that ?

// MS SQL Server 2008. My application has several different connections to sql server database (C#, ADO .NET). Each connection uses the same user name and password. Some connections may execute simultaneously. Is there any problem with that ? Should I add some settings to support that functionality ? Is there any settings in connectio...

Error with calling stored procedure from C#

I have the following c# code to call stored procedure testproc, but when i run this application it displays saying that could not find stored procedure testproc, do i need to make any changes in syntax to call stored procedure. This is my c# code behind to call stored procedure SqlConnection con = new SqlConnection(); con.ConnectionStri...