Hi friends,I have one question about changing data in the DataSet. Whether changing data in DataSet in the manner described below is correct? Here is the code:OleDbConnection* dbConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myData.mdb");OleDbDataAdapter* da = new OleDbData...
1932 byte By
rick7423 at 2007-11-24 5:20:51
I have a stored procedure on a MSSQL2K server that will perform 2 processes. I am doing a check of the processes and will return an int value which specifies whether the processes completed properly, i.e. return val - Meaning0 - both processes failed1 - the first process completed but the second fai...
2225 byte By
THY02K at 2007-11-24 5:24:32
Hi, just downloaded NHibernate and playing with it. I ran into this problem when I tried to persists my very first object to database: "NHibernate.ADOException: Could Not Save Object --> No Persister for SimpleNHibernate.User"Here's code fragment:namespace SimpleNHibernate{ class Tester {...
489 byte By
THY02K at 2007-11-24 5:26:21
How do I detect error while running script with "osql" utility?Dim cmd As String = "osql.exe"Dim args As String ="-S localhost -U joe -P xxx -d master -i"Dim fullCmd As String = args + " '" + scriptfile + "'"info = New ProcessStartInfo(cmd, fullCmd)info.UseShellExecute = Falseps = Process....
913 byte By
sagmam at 2007-11-24 5:29:20
Hi all,I'm really frustrated...I used VS.NET's wizard to create an OdbcConnection object. The object uses a system DSN I created, that points to an MS-Access 2003 database. In the database I have a table called Table1, with some fields. One of the fields is the primary key (autonumber). No...
682 byte By
pjb007 at 2007-11-24 5:47:54
I am writing my ASP by hand rather than using ASP.NET as that is not available to me.I have a database in that MS-Access database is a table called linksIn that table there are 4 columns:The First is a autonumber field to act as an ID this is the Primary KeyThe Second is the URLThe Thrid is the Site...
371 byte By
THY02K at 2007-11-24 5:53:08
I came across one article on data access layer design pattern. It was to show how to separate data access into layers such that one can easily switch between different:1. OR Mapping tools, for instance: from NHibernate to ObjectSpace2. Database vendorI didn't read the article in detail, but I c...
We have experienced subj. in case of feeding list part of combo using one dataset and updating the selected value (making preselection) using another dataset.We have Simple form with one ComboBox and 2 datasets. Mapping of datasets to Combo is shown here, complete example is in attachment. DataSourc...
Hello,Over the past week I've been learning how to use ADO.NET in C++ for a inventory control database. I can make a connection and view the database, but I am not sure how to allow the user to enter a string and variables that will be stored in the access database.For example,I want the user t...
663 byte By
mantony at 2007-11-24 6:02:52
HiWe have a stored procedure to insert a row to a table. We have to use the stored proc for inserting data as per requirements. What is the best way to insert multiple rows using this stored procedure in ADO.net. This is a JDBC code snippet to do the sameCallableStatement stmt = connection.prepa...
Please help! How I can hook Session End event in my Custom ASP.NET control?
Hi there,I have some code that loads in a table from a database: //clear our datasetdataSet11->Clear();//set the select command to everything in our tableoleDbDataAdapter1->SelectCommand->CommandText = "SELECT * FROM FrameType";//fill the data set with that informationoleDbDataAdapter1-&...
hello, i am new to using ADO.NET and data sets !I have one main database I want to compare with multiple databases.I will be comparing the same tables in each database with the same primary key,I want to put any data records from the temporary database (s) table that are not in the main database ta...
Hello,<br/>Could anybody forward the websites which cover memory optimization and general optimization techiniques when developing applications using C#.net, asp.net and ADO.net<br/>Looking forward to get quick response,<br/>Thanks,
305 byte By
atkin at 2007-11-24 6:16:10
Hi Does anyone know how to create a sql script like the Northwind instnwnd.sqlI created one for my database using Query Analyser and used the function Script object to file as. But this does not fill the data in. I dont have enterprise manager, Im using MSDE data base.Thanks...
389 byte By
mantony at 2007-11-24 6:17:33
Hi Gurusneed a little help with ADO.net and SQLServer 2000what is the best way to insert 100+ rows periodically.1. should we use a stored proc?? if so how do we batch it up.2. should we use a dataset and add new rows to it and finally call update.we need high insert performanceplease help with your...
294 byte By
atkin at 2007-11-24 6:19:02
Hi<br/>How to i export the database diagrams that I created in visual studio, i know the file are dtq file. <br/>If i used the project on another pc how can that person see the database diagram in visual studio, or if i re-installed mt msde, how can i get it back to the way it was. <br/>Thanks
HiI'm desperately trying to change the "Nullable" Property of a column but for some reason I either get an error or it just doesn't work. Why? Are the connection settings wrong?conn->Open((LPCTSTR)("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+path) ,L"",L"",ADODB::adOpenUns...
Hi, Can anybody please tell me if it OK to share a connection between multiple threads where each thread performs inserts,updates etc...How is the transaction handled in case of a shared connection when multiple thread are calling BegingTrans on the same connection??RegardsPratimesh...
3183 byte By
THY02K at 2007-11-24 6:26:51
Hi, I'm choosing between transaction on stored proc level and transaction on application level. You see:DECLARE @ValidationCode INTEGERBEGIN TRANSET @ValidationCode = 0EXEC sp_CreateSupplier 1, 'M', 1, 'Golden Lucky and Associates', 'Golden Lucky and Associates', N...
hi, I've got slightly big problem. In AdoMD.NET at ADOMDConnection class I can't setconnection string, anything I put in it, the exception jump out.Even if I want add connection string via constructor.Connection string I am using: "Provider=MSOLAP;Data Source=localhost;Initial Catalog=Food...
238 byte By
sportrx at 2007-11-24 6:28:32
I've seen a few examples of asp.net using ado.net to connect to the database. However, the sample codes didn't show the open and close connections. <br/>MY concern is do we need to open and close the connection? <br/>thanks
Hi All,I have a table in a database that I have created. In my windows form app, I want to be able to list the rows of the table in a drop down box, so that the user can select the correct option for them.So I was wondering if there was an easy way to populate a combo box with a database table?Any...
2103 byte By
KentDMc at 2007-11-24 6:37:00
Hello all,Is there a way to change the DataSet.HasChanges method to True without actually changing any values in the DataSet. I'm working with sending updates to a Pervasive SQL Data Source (ugh!). We have been wrestling with the Pervasive folks about the following issue which is not my questio...
I am trying to write some data into a text file from another database,and I use this code. It is very slow. Any idea why? It takes 10 seconds for 25 records.Is it better to use StreamWriter?OleDbConnection conn = new OleDbConnection(strConn); string cmdText = "INSERT INTO wlevel#txt (WellName,Wate...
684 byte By
barryr at 2007-11-24 6:37:37
anyone got an idea why this won't work: dataView1.RowFilter = "ID NOT IN(" + ErrorString + ") or " + "Description LIKE '%" + KeywordFilter2 + "%' or " + "Name '%" + KeywordFilter2 + "%' or " + "Place '%" + KeywordFilter2 + "%'"; this works fine: dataView1.RowFilter...
620 byte By
THY02K at 2007-11-24 6:37:55
Hi, I need to do a lookup in my DTS package and the lookup will most probably return more than one value:Dim names()names = DTSLookups("name_matching").Execute(DTSSource("param1"))The DTS Lookup "name_matching" is as follows:SELECT supplier_noFROM supplier_tableWHERE (supplier_name LIKE ? + '%&...
284 byte By
THY02K at 2007-11-24 6:37:56
How do you do insert on identity column?<br/>Function Main()<br/> DTSDestination("UIN") = ?IDENTITY?<br/> DTSDestination("address") = DTSSource("Address")<br/> Main = DTSTransformStat_OK<br/>End Function<br/>Basically, I'm inserting a new row. Thanks in advance!
2652 byte By
THY02K at 2007-11-24 6:47:22
Hi, I have two design objectives in mind:1. to integrate NHibernate into data access layer of our applications2. to maintain flexibility to switch from one OR tool (Object Relational mapping tool) to another (HNibernate to ADO.NET 2.0 ObjectSpace for instance).To meet these requirements, it's n...
964 byte By
pphari at 2007-11-24 6:51:44
Hi Friends,Please help me for make a solution for the following problem :- I would like to use SQL server 2000 with my exisitng MFC based data acquision/presentation application. I prefer to use the ADO.NET as the interface (with new its nice design and features).As an experimental purpose i just co...
859 byte By
aquafin at 2007-11-24 7:00:24
<%set rs=server.createObject("ADODB.recordset")sql="select number,customer_name from report where number like '"&mobile&"' "rs.Open sql,connrc=rs.RecordCountif (rc<>0) thenresponse.write("The mobile Number already exists")end if %>In the above asp code, i use the record count p...
313 byte By
ka_ka at 2007-11-24 7:04:00
I am working on a web based ASP.NET application . I am writing the code behind using vb.net. I was planning on using a file field control and then store the pdf file in a sql database . the user can also download the file from the sql database. Can somebody help in write this code....
1207 byte By
SatyaV at 2007-11-24 7:08:51
Hi,I am a n00b to ADO.Net. Trying to write a program to connect to a Oracle 10g database, but am having issues.(WinXP/.Net 1.1/ Oracle Client 9.2.0.1.0/ Microsoft ODBC driver for Oracle 2.575.1117.00). Tried using Oledb but system generates weird errors. Now trying ODBC. When I use the following cod...
3967 byte By
THY02K at 2007-11-24 7:10:00
Help! Child-Parent relationship -- Key happens to be a composite keyHi, I'm having a lot of trouble trying to get this work. I have two classes:1. AppProperty (Parent)2. AppPropertyValue (Child)1. AppProperty class' PK column is PropertyUIN (Int32). 2. AppPropertyValue class' composit...
1932 byte By
csewell at 2007-11-24 7:16:13
Maybe there's something I'm doing wrong here. I'm open to any suggestions.I'll see if I can explain this clearly...I have a C# application that runs 24x7 collecting data from some source and storing the data in a Microsoft Access database. The problem is, every time it stores t...
This is a clarification to an earlier post. I am debating on what route to take in a closed environment with upto 100 concurrent users against a single SQL2000 DB. This is a medium sized enterprise scale application with reasonable traffic expectations, most of which which will be reads. Its a datas...
208 byte By
d00_ape at 2007-11-24 7:43:59
What to do if I like to store an XML-file of size up to 10MB in SQL 2000 Server? What is the best solution of that problem. What type of column should I use and can I use the regular INSERT INTO SQL statement
:confused: I have few autogenerated columns in a DataGrid.I know that autogenerated columns are not included in the COlumns collection of datagrid.But then how do i retrive a value of certain cell in the datagrid?Like I wud have ideally useddataGridDisplay.Columns[i].ToString();to get the ith colu...
326 byte By
binayak at 2007-11-24 7:47:57
HiI have a basic question. I want to copy a table in a db to another db (in the destination the table has to be created first with proper columns). the table name and schema will remain same. (I'm using sql server 2000).Can you provide sample ado.net code, by which I can achieve that?Thanks...
We know SQL connection lifetime is 60 seconds for idle connections. If I set the lifetime of my ADO.NET connection object to 500 seconds. And the connection sits idle in the pool for say 150 seconds. Will SQL shuts down its side of the connection? If yes, well, that's easy I will know that the...
If I create an MFC application using managed extensions for C++ I thought it was possible to use ADO.NET and Crystal Reports to add reports to an old MFC application. Is there any reason I can't do this?
Hello All,Objective:To fill in 'DataGrid' by running SQL 'Stored Procedure' where parameters are passed by textbox and listboxes.Error:Procedure or function Test_Proc1 has too many arguments specified. Description: An unhandled exception occurred during the execution of the curre...
I have the following connection string and command text -calling a stored procedure. The stored procedure will time out as it takes quite some time. How can increase the time out value in my case?.ConnectionString = "Provider=SQLOLEDB;server=(local);database=CPSM;uid=sa;pwd=;".CommandText = "EXEC my...
1024 byte By
THY02K at 2007-11-24 7:57:16
I have this one question in regards to configuration file - what if I need to configure for MULTIPLE DATASOURCE?Example:<nhibernate> <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" /> <add key="hibernate.dialect"...
I have made a simple ASP.Net program which would pass parameters to the Stored Procedure in SQL Sever and would return back a row or two. The code is working fine when i try it on test DB which size about 3MB how ever if the code is tested on bigger size DB of about 2GB it will give this error:Error...
Knowing that you can make a list view look much like a DataGrid (WinForms, not ASP) and that it would be pretty easy to make a data binding function and a column sort function for a class derived from ListView, I would like to know what is the advantage of the DataGrid?I find selecting rows to be ve...
770 byte By
dzanf at 2007-11-24 8:03:56
Hi all,I have some problems with the function "Execute" on a db SQL Server. I run this code: try { if (m_pDBI->Execute((LPCTSTR)strSQL)) risp = TRUE; } catch(SrvError::ADOerror e) { if (error != NULL) *error = e.def; }where strSQL is a correct UPDATE operationSometimes it locks the db. Afte...
I am trying to use the OleDbCommand and OleDbDataReader to insert a new record without using DataAdapter and DataSet. I am not able to work out the syntax for adding parameters to the SQL. All the examples use the DataAdapter for this.I started down this route and now I am not sure how this all re...
2338 byte By
florin23 at 2007-11-24 8:14:37
Hello. I am a .net nevby.I try to update rows in a Postgresql Database, from a application written in VB .NET.I have some textboxes on my window form, bound to a DataSet via a Databinding: Me.lbId().DataBindings.Add(New Binding("Text", dsPupil, "esantion.Id")) Me.txtNrMat().DataBinding...
Hello allI am making a client server application in which client will call system calls and send the information to server.I want to store that information into database e.g Access using ADO( in VC++).Plz guide me what should i do?Do i have to do serialization of data?e.g From client i have to send...