Connection goes dead

391 byte By alcOrtholite at 2007-11-24 11:42:35
Hi Everyone,I am receiving the following error:-System.InvalidOperationException: The connection is dead.after executing a reasonably large query. I am using the ADO.NET ODBC data base comms functionality and am connecting to DB2. Is there some sort of timeout that I need to adjust to keep the conne...

paging in custom control

646 byte By Srinivasap at 2007-11-24 11:47:30
Hi,I am building a custom control, wich display like treeview grid. Like parent and child grid like treeview.Now the issue is paging. Can any one suggest how to proced for paging.Till now my logic goes like thisProperties can be set likemycc.conncetionstring =strConnectionmycc.ParentTableName =strT...

NHibernate and DataGrid paging

1002 byte By THY02K at 2007-11-24 11:55:33
Hi, I need to implement custom DataGrid paging: http://dotnetjunkies.com/Tutorial/EA868776-D71E-448A-BC23-B64B871F967F.dcikBasically, idea is called a stored proc and retrieve only those records you need on "Current" page, thereby reducing processing and data transfer. The stored procedure takes as...

How to access SQLServer

1531 byte By nnbbmm at 2007-11-24 12:00:02
Hello,friends: I do a small exercise in my home. The computer is only one, OS is Windows server2000.And SQL server2000. the computer name is NBM, is as follow. Microsoft SQLServer SQLServer Group NBM(Windows NT) Databse master model msdb MyDB to MyDB the Us...

ADO vs. AD.Net

1074 byte By BlakeK at 2007-11-24 12:01:25
We have an application that was written in VB6 and connected to a SQL Server using ADO. It runs on 20 machines, and has been running without problem for a couple years.I just finished converting the project to VB.Net and the application runs fine on one machine at a time, but when you start it on m...

stuck really bad. ExecuteReader fails

1237 byte By venAdder at 2007-11-24 12:01:48
hi,I am usingVisualStudio2003,Access2003Vb.Net and ADO.Net for db access.I get this message when i try to use ExecuteReader method :IErrorInfo: GetDescription failed with E_FAIL( some hexvalue )Now i tried MSDN it says GetDescription supposed to return description of error that is generated by datab...

Help: how to use native recordset in .net windows form application

573 byte By lizzly at 2007-11-24 12:05:11
Hi, I need to use a function from a dll file (not COM) which return a native recordset in my .net windows form application. I first tried to import msado 2.7 library directly, It generated idataobject ambiguous problem.Then I added the adodb.dll to the reference. But the .net only know ADODB._record...

Can NHibernate call stored procedure?

202 byte By THY02K at 2007-11-24 12:05:16
Can NHibernate call stored procedure? I checked NHibernate reference doc ( http://nhibernate.sourceforge.net/nh-docs/en/html/single/reference.html) , doesn't look like it's there... am I right?

Image

277 byte By THY02K at 2007-11-24 12:05:33
1. Hi, I am using "image" column for storing jpg and gif images. But there's another requirement to store Word/Excel document. Should I use "image" as SQL column data type? <br/>2. should I use Byte array as data type on application level?<br/>Thanks in advance.

Insert statement problem

553 byte By venAdder at 2007-11-24 12:14:05
Hi,I have a table called MyTable in which there are three fieldsId, Name, AddressId is setup as autonumber field in access2003 database.Now I use ADO.Net in VB.Net to insert a new record in this table.Problem is since ID is autonumber a statement like this"Insert into MyTable values( 'SomeName&...

Insert method to Microsoft Access

593 byte By QQQ at 2007-11-24 12:15:55
Hi everyone,I am very new to C# and ADO.NET. Right now, I want to build an application that connect my application to a database which is Microsoft Access. Displaying a data from Access to a Data Grid in C# is no problem to me. However, I want to let a user to give an input to the table so that the...

How does .NET Data Provider for SQL Server convert varchar data to Unicode?

444 byte By potts at 2007-11-24 12:16:02
After executing a select query the data provider returns the value in a varchar field in a .NET Unicode string, how does it determine the encoding conversion to perform? My guess is that it's determined by the collation setting on the column, but I'm not sure? For example, if the collation...

Connecting MySQL through ADO with MyOLEDB provider

1355 byte By mehran20 at 2007-11-24 12:21:47
Hi,Recently I have tried to develope a software using VC++ MFC and MySQL Data Server. After I searched the web I found out that there's an ADO provider for MySQL named MyOLEDB. So I started working with it.Everything was fine, I tried most of the queries such as select, updata, delete and inser...

insert text truncated in ADO, not in ODBC?

1199 byte By ir_fuel at 2007-11-24 12:27:33
HiThe problem is the following:i have an ms access database containing a memo field and i want to insert a new record from within my c# app.I use an ADO connection and an ADO command.this is my sql command text:"INSERT INTO ProductTable (Description) VALUES (' BLA BLA BLA BLA BLA')All of t...

How to view multilingual from datagrid

302 byte By yarowave at 2007-11-24 12:30:59
Hi all,My database (MSSQL 7) contains data that has both english and korean.My datagrid from window from show english ok but koreancharachter only show ????How can I resolve these problem?Environment: Visual Studio .Net 2003Language: C#Thanks...

Inserting Parent And Child Values From DataSet

2598 byte By KenFalk at 2007-11-24 12:38:36
I have windows form used to manage groups of clients Database structure: -Group Table: stores ID of the group and name of the group -ClientTable: stores ID of the Client and the name of the client -Group Membership table: stores the ID of the client and the ID of the groupForm - see ht...

Can I change the Excel column type from Text to Numeric?

297 byte By Ai _Jun_Zhang at 2007-11-24 12:39:32
Hi! <br/>I have used VB.net ADODB.Recordset to get the data from database and output them to Excel. After the data are written to the excel file, I like to change a column from type TEXT to Numeric. Is there any way that I can do that?<br/>Please advise.<br/>Thanks,<br/>Aijun.

Help - OleDBProblem

644 byte By Kaktusbluete at 2007-11-24 12:39:49
I have to write a little Client/Server App. where the Client uses a MSDE to check out Data when he gets out of the House.When he reconnects to the System the Client haves to Sync the whole Data (including Authorisationinformations - new Users etc)So right now I've made 2 System.Data.OleDb.OleDb...

Code Gurus - Where are you???

654 byte By sboyko at 2007-11-24 12:43:06
I use vs2005 beta2 to show data in hierarchical form.For showing (grand)child levels i use tab controls with additional gridviews.My dataset is large, and to show all data levels i need a lot of tabcontrols and datagridviews.As result my vs2005 suspends up to 30 minutes in design mode.i'd prefe...

NHibernate: SQL update or deletion failed (row not found)

1032 byte By THY02K at 2007-11-24 12:44:32
Hi, I keep getting:SQL update or deletion failed (row not found)When I try to delete a record... I can't figure out what's wrong with my code:sess = connManager.GetWarehouseNHibernateSession(True) trx = sess.BeginTransaction() zInv = sess.Load(GetType(warehouse.to.zIn...

NHibernate - one-many inverse=true

942 byte By THY02K at 2007-11-24 12:47:01
Trying (and having trouble understanding) to understand "inverse" ...ou may map a bidirectional one-to-many association by mapping a one-to-many association to the same table column(s) as a many-to-one association and declaring the many-valued end inverse="true"..........<many-to-one name="Parent...

Unable to update DataBase from DataSet

684 byte By Rahul5976 at 2007-11-24 12:50:46
Hi..!I am getting prob to update the databse from DataSet(ds). I have a ds with one DataTable(dt). there are two rows in dt. i am updating one row in the dt and wants to update the main Database. it updates the dt and ds do not update the DB. even it do not give any error. to upadate the table in DB...

Locking and transaction isolation levels

1799 byte By THY02K at 2007-11-24 12:54:31
Hey guys,QUESTION 1: Is this correct?I. Transaction Isolation Level Serializable = Pessimistic LockingFor example:trx = conn.BeginTransaction(IsolationLevel.Serializable)ie. When two threads try to access the same record..1. Thread 1 begins tran and select [record 123] (I presume a X-lock *Exclusive...

MS Hierarchical FlexGrid

768 byte By pjhenry1216 at 2007-11-24 13:07:42
I'm using MS Hierarchical FlexGrid to display hierarchical data from a database in a grid. As of now, I can't find out how to do that. I'm using Microsoft Visual C++ .NET 2003. I want to display data from two tables. One table has primary information, and the second table has mult...

Desperate for help, not filling dataset

4981 byte By jmckown at 2007-11-24 13:12:17
Im really stuck and confused. The first part of my code takes a csv file and puts it into a dataset and then populates a list box from the dataset. The second part tries to do a select against the database for each item in the listbox but fails to populate the dataset with no exceptions. obviousl...

How to store data of two tables..

346 byte By kolluru at 2007-11-24 13:13:55
How to store data of two tables in a dataset....The thing Iam doing is...dataset.tables.add("Table1");dataset.tables.add("Table2");DataTable db = dataset.tables.Add();Now db[0] contain table1...db[1] contains table2 data....Is this correct...Can I maintain data in a single datatable......

difference between ado.net and orm.net

180 byte By alirizwan at 2007-11-24 13:15:45
hi<br/> plz tell me that what is difference between ado.net and orm.net<br/>Regards,<br/>Ali Rizwan (Web Developer)<br/>Aztek Computers<br/> http://www.aztekcomputers.com

Data Adapter Update Method Problem

2240 byte By virlinz at 2007-11-24 13:18:29
HelloI'm trying to update the new rows added in the DataSet into the database but my attempts never seems to work. I might miss a few line of codes and I hope anyone can point me out the mistakes I made or give some tips to handle this kind of problem. I'm a newbie. The following is the co...

Problem saving DATE TIME into Database

1123 byte By RMirenzi at 2007-11-24 13:21:17
Hi, I'm having problems inserting datetime into and access database as shown below string insert = "insert into " + TableName + " (Name,Location,Date) "; insert += " values('" + row["Name"] + "','" + row["Location"]; insert += "','#2/2/2004#')"; System.Data.OleDb.O...

DataBinding & Update

3511 byte By virlinz at 2007-11-24 13:22:38
Hello I'm trying to update the dataset with the data from textboxes but the following code is not working for me.Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dsn As String = ConfigurationSettings.AppSettings("dsn") oCo...

MSDE not connecting in windows 98

727 byte By nileshgambhava at 2007-11-24 13:24:05
I have made windows application using .NET 2.0 BETA 2.0(VC#) with MSDE(Release A) as database tool. Now when I install my application on Windows 2000,XP,2003, it works well. But When I install on Windows 98, application is not connecting to database..On command prompt, using OSQL, I can list databas...

Parameterized SQL

1283 byte By hoffmandirt at 2007-11-24 13:32:54
I cannot get this query to work with parameters for the life of me. I am using OleDb and I have tried the 3rd question mark below with and without the ' '. I keep getting invalid group by expression as an error. When I put the values in the sql it works fine as shown in the second sql s...

where is the value?

774 byte By seasail at 2007-11-24 13:38:11
private void Page_Load(object sender, System.EventArgs e) { if(!IsPostBack) { dlname =Session["dldrop"].ToString(); Session["dln"] =dlname; DataBind(); } else { dlname =(string)Session["dln"]; } btnFirst.Enabled =false; btnPrev.Enabled =false; }when the first time tra...

How to define a strongly typed DataSet in WSDL types?

1215 byte By donc at 2007-11-24 13:46:46
I've got two questions:1. Is there a 2nd way to declare a strongly typed DataSet (e.g. CustomerDataSet) in WSDL instead of using the WSDL <import namespace="CustomerDSnamespace" location="url to CustomerDS.xsd"/>?Apparently, if I include CustomerDataSet schema definition in WSDL types, it...

Help - Oracle function w/RETURN VIEW_NAME%ROWTYPE

1725 byte By MarFarMa at 2007-11-24 13:49:21
I have a fairly complex Oracle function with a signature like this:FUNCTION get_some_data( in_param_one VARCHAR2, in_param_two VARCHAR2)RETURN VIEW_NAME%ROWTYPE(The internal logic of the function is such that it will return at most one row.)I have sample code from MSDN that outline...

Displaying datagrid on second form

5561 byte By SLG29 at 2007-11-24 13:51:46
I have a form which has a listbox, 5 textboxes and a datagrid, what I'm trying to do is when a user double clicks a row on the datagrid this then displays another datagrid on the second form with the information from the Items TableI have already set up a data relation to link the Customers and...

Problem while calculating MAX for CSV file

676 byte By DeepthiV at 2007-11-24 14:00:56
Hi everyone,i have a csv file with 1000 records with a column header and decimal values. In VB.Net using ADODB record set i want to display max ,Avg of every column.Suppose a column have 0.0001,0.003,0.0123,0.1041,0.000087 as values andwhen i used query Select Max(<column_name>) from abc.csvSe...

Data Grid in ASP.Net

61 byte By SMSarvani at 2007-11-24 14:01:17
how to add and update values in ASP.Net datagrid. Please help

Crystal Report display through user control

260 byte By aswini at 2007-11-24 14:08:29
hi,<br/>I've a search page from there am trying to pass dataset to viewer page<br/>which has user control . the Crystal Report Viewer is present in the user control. How do I pass the dataset to the Crystal Report Viewer <br/>regards,<br/>aswini

unable to update database from dataset

738 byte By poojanair at 2007-11-24 14:17:23
I have problem with the update commandHere is the sample code:Throws an exception- saying synatax error in INSET INTO DataRow* pNewRow = m_pAuthorTable->NewRow(); pNewRow->BeginEdit(); { pNewRow->set_Item( "ID", __box(Convert::ToInt32(m_pAuthorTable->get_Rows()->get_Item(...

Unable to establish ADO Connection

887 byte By psgmathi at 2007-11-24 14:18:26
I am trying to use ADO connection in VC++ application with Document \View Architecture which was developed using the prevoius version of VC++..I import the DLL using #import "E:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF", "EndOfFile")But it is giving the following...

Error in Connectionstring : property not supported initial catalog

711 byte By kuldeept at 2007-11-24 14:24:08
Hi, I'm trying to access MSDE from my application. this is the piece of my code:string conString="Data Source=Xppro100\MyInstance;Initial Catalog=TEMPDB;User ID=sa;PWD=password";SqlConnection con=new SqlConnection(conString);con.open();.....This works fine on my Win XP professional machine(i...

Access Hyperlink Data type

243 byte By TSmooth at 2007-11-24 14:30:17
I have an access table that has a column called "ItemLink" and is of the type "Hyperlink." When I query this table and select this field, I get the display text of the hyperlink and not the url. How do I get the URL from this field in a query?

OleDBCommandBuilder Update Command

819 byte By Kahlua at 2007-11-24 14:34:48
Hi,I need answer for this question: What's the point of change automatically generated update command by OleDBCommandBuilder from 1.0 to 1.1 framework? I tried OleDBCommandBuilder with this select:Select ID, Title FROM Tablewhere ID is a primary key and Title is a column, which enables null val...

Memory Leak with Recordset?

1576 byte By jalway at 2007-11-24 14:36:58
Hello, I'm using ADO 2.8 with VC++ trying to release a recordset object from memory, however the memory allocated when the recordset was populated is not completely freed. Most of it, in fact, remains in memory. I've read elsewhere that RecordSet fields are AddRef'd but not Released,...

Auto-generating SQL to fill a DataSet

1494 byte By GazzaJ at 2007-11-24 14:38:16
I am writing an application where I am using strongly typed DataSets to define the DataTables and relations used in various parts of the application. I have code that takes these DataSets and converts the rows in the DataTables to objects which I then use in my application. The reason for using st...

Determining whether DataRow values have changed

802 byte By GazzaJ at 2007-11-24 14:41:40
I have an application with a strongly typed Dataset which I populate and then transform the rows in the DataTable into objects used in my application. The application then updates the objects and I call code to update the appropriate DataRows before submitting the updates to the table.I originally...

test

4 byte By renu@vc++ at 2007-11-24 14:45:01
test

exception error ado20

1301 byte By mohamed123 at 2007-11-24 14:53:25
hi following is my codethere is exception errorcant figure out why ?CString iniFile = "C:\\Programme\\Thumbnailer\\Thumb.ini"; GetPrivateProfileString ("Paths","dataBasePath","Error: Failed", pathDataBase, 100, iniFile); CString connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + C...

Trigger and transaction context

1838 byte By THY02K at 2007-11-24 14:56:32
Hi, I'm running into a situation:trx = conn.BeginTransaction();acc = AccBean.Load(acc_id, conn);request = RequestBean.Load(request_id, conn);//STEP 1: check and validate acc has sufficient fundsif (acc.Balance >= request.Amount) {//STEP 2: update request statusrequest.Status = Status.APPROVE...