Resizing rows height in a WindowsForms DataGrid automatically
Hi
Does the WinForm DataGrid has a property that enables it t
increase the height of certain rows automatically, in case whe
in those rows, some cells contain text that cannot fit inside of them
so instead of just trimming the text, the whole row's heigh
increases? Something similar in concept to what an HTM
table does. If not, is it possible
For example
CustomerName|CustomerPhone
-------------------------------------
ShortName | 000-0000000
-------------------------------------
This is a very | 001-0000000
long name |
-------------------------------------
ShortName2 | 003-2222000
-------------------------------------
Thank you so much for your time :) Tag: Attention William Ryan eMVP Tag: 85851
ANN: SocketPro -- A framework implemented with batching/queue, asynchrony and parallel computaion
Hi, All:
I am happy to annouce that we have released our latest SocketPro version
4 (in beta), an advanced framework written from batching/queue, asynchrony
and parallel computation.
Key Benefits of SocketPro:
Super performance
It is a guarantee that SocketPro based client-server
applications beat all of .Net remoting, DCOM, COM/Surrogation, MTS/COM+,
Corba, Java RMI and Web service in speed UNDER ANY CASES! No joke!
Lots of unique features
None of common frameworks can provide more features than
SocketPro. Many of SocketPro features are unique, which can not be
implemented in other frameworks and are found ONLY in SocketPro.
Simple to use
SocketPro completes all of common distributed application
tasks. The latest version of SocketPro can match with anyone of common
distributed application frameworks in simplicity.
Notification service
SocketPro implements a built-in notification service, which
enables you to notify a message to one or more clients either from a remote
server or from a client.
Different programming experience and lots of fun
SocketPro is written from batching, asynchrony and parallel
computations. You can get a totally different programming experience with
lots of fun, and will have no or much less multithreading and event problems
to bother you!
Accessing your data securely anywhere over all of types of networks,
Dial-up, cable, DSL, Wireless modems, and LAN
SocketPro is created for internet development with all of
types of networks. You can share your databases, files, and messages over
all of types of networks. You can even use a phone line modem to access
these data with decent speed.
Secure
Embedded with openssl to secure all of data transaction
between clients and servers, beginning with the version 3.0.0.1.
Support all of COM-enabled development languages for client
applications
SocketPro comes with a set of COM objects exposing
IDispatch-derived interfaces. It can be used with all of COM-enabled
development languages.
Support lots of development languages for server applications
The latest version of SocketPro supports not only C/C++ with
all of compilers available but also dotNet languages. SocketPro supports all
of development languages capable of handling window callbacks and threads.
Great interoperability
Unlike common distributed frameworks, SocketPro has great
interoperability among many different development languages. For example,
you can easily let old VB code communicate the latest dotNet managed code.
Support multiple services with one port
As shown in samples, SocketPro server provides different
services with one TCP/IP port. You can easily add your services into a
SocketPro server. All of services can be switched at run time.
SocketPro can be free to you
Within a limited time period, you can get a copy of SocketPro
for free!
--
Yuancai (Charlie) Ye
Fast and securely accessing all of remote data sources anywhere with
SocketPro using batch/queue, asynchrony and parallel computation
See 30 well-tested and real OLEDB examples
RDB, a tool for fast and securely accessing remote databases with dial-up,
cable, DSL and wireless modems anywhere
www.udaparts.com Tag: Attention William Ryan eMVP Tag: 85845
Distributed transaction completed errors
I am encountering SQLClient errors in a COM+ object (spawned from Biztalk) that extracts data from an xml document and updates a SQL table (version 2000 8.00.760 SP3)
Under a fairly low load of documents, there seems to be no problems, but with several messages to process, these errors start to stack up. I also see "SqlConnection does not support parallel transactions.
I am only using one SQL connection, one stored procedure - and one SQLTransaction that may be called a couple of times throughout the process
Any advice will be greatly appreciated
Troy Tag: Attention William Ryan eMVP Tag: 85840
Double or float - make your mind up!
I use floats in SQL server as they are its standard datatype for dealing with non-integral numbers
I thus thought it would be logical to use the SqlDbType.Float for accessing parameters of this type in ADO.NET, from C#
However, when I declare an SqlParameter with SqlDbType.Float as its datatype, its Value property after the command has executed can't be cast to a float, only a double. I'm OK with this if this is what the DB engine wants to do - but is it really correct?????? I know I could cast to a float but would there be much point if I'm only doing comparisons, not much maths. I'm mainly after fast performance
Thanks! Tag: Attention William Ryan eMVP Tag: 85818
Fastest db methods?
Could someone tell me which is faster, or no difference, between
Which is the fastest out of the following two methods??
Reading a recordset using SqlDataAdapter.Fill(a_dataset) / reading a recordset using SqlDataReader ??
Which is the fastest out of the following two methods??
Reading a recordset using SqlDataAdapter.Fill(a_dataset) / reading a recordset using SqlDataReader *after* doing an ExecuteNonQuery on the same command (after changing an in parameter's value to enable the SQL to be optimized) in to glean output parameters (which need to be used during the reading of the records
Which of the following three is faster, or none at all??
Accessing fields using dr.GetInt32(0) / dr["fieldname"] / or dr[0] ?? Tag: Attention William Ryan eMVP Tag: 85817
C# oracle connectivity
Consider a situation that i need to connect to a remote oracle database using a ASP.NET interface. I dont have the access to change the TNSname.ora file. In that case, how can i connect to oracle using the following information:
1. Network Address
2. Port
3. SID
4. User Id
5 Password
Java does allow this. But the .NET connection string using both ORAClient or Microsoft's Oracle native driver, doesnt allow me to do that.
Any body who can help me on this.?
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. Tag: Attention William Ryan eMVP Tag: 85815
Still unable to connect to SQL database on non-development machine
Hi
I have still not been able to sort out the issue of a non-development machine not being able to open a connection to an SQL database.
Aaron, if you read this thanks for any help you can/could give me
The details are as below
My connection code is (using VB.net):
myConnection = New SqlConnection("data source=SPEEDY;initial catalog=OpsAdminTest;integrated security=True"
MessageBox.Show("connection string: " + myConnection.ConnectionString
MessageBox.Show("myConnection.Database: " + myConnection.Database
MessageBox.Show("myConnection.DataSource:" + myConnection.DataSource
MessageBox.Show("myConnection.Workstationid:" + myConnection.WorkstationId
Tr
myConnection.Open(
Catch ex As Exceptio
MessageBox.Show("Error opening connection"
End Tr
MessageBox.Show("finished initialization"
This is done immediately after the InitializeComponent() call in the application
When I compile/release the code for installation and then install on the same machine that I developed it on, it works fine.
But when I install on the non-development machine, it fails to open the connection
>Are you using DSN, if so, is there an appropriate DSN connection on the non development machine
The non-development machine has the SystemDSN connection to the OpsAdminTest database as it is an active database that we use for test developement of other services. My company does interactive voice services for various tv/radio/magazines and we use SQL to maintain the services
>Are you using Windows or SQL authentication
We are using windows authentication for the SystemDSN connection to the database
>Have you used SQL Profiler to see if you are even touching the SQL server
Sorry this question eludes my limited knowledge. How would I use SQL Profiler in my code to see if I am connection to the server
Again, thanks for any help Tag: Attention William Ryan eMVP Tag: 85809
Real Simple Insert - doesn't work
Hey
Trying to do a real simple online Newsletter form - an Insert into a SQL Server DB, but when the submit button is pressed, the page refreshes, but nothing is added to the DB.
Code
Dim ConDB As SqlConnectio
Dim strINSERT As Strin
Dim cmdINSERT As SqlComman
ConDB = New SqlConnection("Persist Security Info=False;User ID=xxx;password=xxx;Initial Catalog=xxx;Data Source=xxx"
strINSERT = "INSERT Newsletter " &
"(FName, SName, Email) " &
"Values ('" & Fname.Text & "','" & Sname.Text & "','" & Email.Text & "')
cmdINSERT = New SqlCommand(strINSERT, ConDB
ConDB.Open(
cmdINSERT.ExecuteNonQuery(
ConDB.Close(
appreciate your assistance guys. Tag: Attention William Ryan eMVP Tag: 85803
How to determine that rows on server changed and dataset needs to be updated ?
Hi,
I'm starting using ADO.NET and trying to understand if there is any
analog of Server side cursor in ADO.NET.
Using ADO i could just open recordset with serverside cursor and
adOpenDynamic options. Then if another user has changed values on the
server while recordet is opened, i got updated records automatically.
In ADO.NET i couldn't find the way to implement this future.
Is there any event or something else that informs program that records on
the server had been changed ?
Best Regards,
Giga. Tag: Attention William Ryan eMVP Tag: 85801
solve my problem
(Type your message here)
Hi all,
Now I am doing my project using VC++/MFC and sql server as a database.I hava to store the Bitmaps in the database.If anybody knows about how to store the bitmap in the sql server as a BLOB object & retrive it.please help me it is urgent.
--------------------------------
From: Ramesh Kumar
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>Dv3OrgDiFEaF9UAPoH2Etg==</Id> Tag: Attention William Ryan eMVP Tag: 85800
Updating datagrid display using custom collection
I'm having problems refreshing a DataGrid that a custom business
object collection (PeopleCollection) is binded to. The
PeopleCollection class maintains a collection of PersonInfo items.
The PeopleCollection class inherits from CollectionBase and implements
IBindingList. The PersonInfo class implements IEditableObject and
IDataErrorInfo.
What I have so far, is when a user double clicks a row on the DataGrid
a 'Person Details' form is displayed showing the details of the person
selected. The details of the person may be changed via textboxes on
the form. This works well. Problem is if the user changes, say, the
name of the person on the form and clicks the OK button the Person
Details form is closed, but the new name is not displayed in the
DataGrid (it still displays the old data). I know the new name is
propagated to the PersonInfo object cause if I click on the row that
was changed by the form the DataGrid decides to refresh itself,
therefore displaying the new name. So, how do I update the DataGrid
when the PersonInfo object is updated? I know the PersonInfo object
should be notifying the PeopleCollection object, which should then
raise the ListChanged event.
The DataGrid updates nice and well on addition and removal of people
from the the collection. Problem is only with modification of person
objects.
I've been working with a small sample program that you can download
from microsoft's website.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet02252003.asp
Hope you can understand my problem and help out. If there's any
articles on the web that may point me in the right direction, let me
know.
Thanks a bundle to all replies. Much appreciated. Tag: Attention William Ryan eMVP Tag: 85792
finding child tables
Oracle.
1)how to find all the the existing chaild tables of a master table?
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>uQ+Pk5MDTU2Wcrlfzf3Buw==</Id> Tag: Attention William Ryan eMVP Tag: 85791
very rookie VBScript ADO RDS Binding question
Looking at what is posted here, I'm afraid this will be a real dumb thing to ask (I'm just getting into web programming after having worked in mainframe programming for a long time).
I'm learning about ADO RDS Binding. My (simple) web page finally has been made to successfully retrieve a little data from my sample database (which has a "songs" table and a "users" table - joinable on a field called "username").
I'm now trying to persist the extracted recordset (eventually in XML and in a "stream") and to make a user fiendish (oops - I meant "friendly") "table" with sortable column headers and all that...
To help me learn about the topic, I found a very interesting MSDN article that had a great looking VBScript at the bottom. The idea of the script is to present form input fields via the page and you can override defaulted connection info and have the script draw you a simple "table" from one of your database tables...
Well - I can't get the VBScript to work... I get the form inputs to show up just fine but when I click the "run" button, nothing seems to really happen (and I sure don't get my MS Access info displayed in a "table" on the screen like is supposed to happen). So, my question is "can someone coach me as to how to get the script really to work?" I can share where to find version of the script if that would help.
The MDSN article is at: (except for very minor tailoring like putting my column names in where they had different columns, my script is exactly like the one in the article)http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjaddataconx.asp
Some of my connection info is as follows:
' CONNECTION STRING
DataBasePath = Server.MapPath("..\db\fpdb\srtestdb.mdb")
DatBaseDriver = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="
DataBaseSource = DatBaseDriver & DataBasePath
' CONNECTION
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open(DataBaseSource)
' Create an ADO recordset object
Set rsSRDB = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT [songs].[songtitle], [songs].[songgenre], [songs].[songusername],
[users].[username], [users].[emailaddr] FROM users LEFT JOIN songs ON [users].[username]
=[songs].[songusername];"
' Open the recordset with the SQL query
rsSRDB.Open strSQL, DBConn
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources... Tag: Attention William Ryan eMVP Tag: 85789
Strongly typed data sets
Hello there,
How can I automatically create strongly typed data set from existing SQL
Server 2000 tables.
I know that I can drag and drop a table to generate one, but I'd like to
generate strongly typed
data set for all specified tables with relations between them ? Is it
possible with Microsoft Visual
Studio Enterprise Architect 2003 or another tool ?
Thank You
Best regards
Rafal Grzybowski Tag: Attention William Ryan eMVP Tag: 85785
Date Querry
Hello,
I am working with an Access Database and am trying to return a Querry that
is between two specified dates, I have tried the following and none of them
work:
1)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
'Date' > " & dtpFrom.Text & " and 'Date' < dtpTo.Text & ";",
AConnectionString)
2)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
[Date] BETWEEN DATEPART ('" & dtpFrom.Text & "') AND DATEPART ('" &
dtpTo.Text & "')" , AConnectionString)
3)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
'Date' > 1/1/2004 and 'Date' < 6/1/2004;", AConnectionString)
No records are returned. Any suggestions will be greatly appreciated.
Thanks,
Chuck Tag: Attention William Ryan eMVP Tag: 85783
Advice on filtering and using a Data View
Using vb.net, I created a data view and would like to filter the view and
determine if a record or group of records exists. My question..........is
there a property I can check to determine if the view contains records
meeting my criteria after filtering is performed? Also if the view does in
fact contain records, is there a way to loop through view to get certain
field values from it?
Wil. Tag: Attention William Ryan eMVP Tag: 85773
Error create DataAdapter with Config wizard.
hi
I was trying to use following query to create Data Adapter
SELECT DISTINCT Orders.OrderID, Orders.CustomerID, Orders.EmployeeID, Customers.CompanyName, Customers.Address, Customers.City FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerI
Error always happen with
--------------------------
Primary Key Columns Missin
--------------------------
The wizard can not automatically create queries for updating the database because your query does not include some primary key columns. Do you wish to add the primary key columns to your query
Please suggest how can I fix it
rgds
Fish. Tag: Attention William Ryan eMVP Tag: 85763
Get "table doesn't have a primary key exception"
I get a "table doesn't have a primary key" exception during a
.Rows.Find(string);
However the table has a primary key. I moved it from one column to an other.
But the table designer shows it.
What could be wrong? Tag: Attention William Ryan eMVP Tag: 85753
Web Services and SQL Server Stored Procedures
I've written a very basic web service that is used by my PocketPC to add two
numbers together. It works fine. So next I'm writing a WebService which
accesses my SQL Server
and returns rows appertaining to a specific OrderId.
I have written a stored procedure called spGetConfirmedOrder to which I pass
the OrderId and it works okay until I need to reference it in my code then
it doesn't recognise
it. Is there something that I'm missing out here do I need to get involde
with SOAP and WDSL files
or can I just use ADO.NET?
Regards
Chris
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004 Tag: Attention William Ryan eMVP Tag: 85749
DataGrid master-detail indicator
Microsoft make a feaure in Datagrid that support master-detail in the one
grid.
but for end user i prefer to present MD by tow grids.
on the master grids have automatic indicator (+), this is redundant, and end
user
may confuse with it.
can i remove the (+) indicator from master datagrid?
how to do that? Tag: Attention William Ryan eMVP Tag: 85741
SqlConnection Question
Hi ,
I have a Dll with few functions and when i m opening a connection by using
one of the Dll functions
and i m relating the connection to some SqlDataReader then i can't use the
connection for other purpose
until i will close the DataReader .
why is that ?
why i can use the connection for other things but for SqlDataReader more
then once ?
how can i work with the same connection ?
should i work with one connection or should i open a new one ?
please notice that i need to use the connection while i m in the middle of
some loop in the datareader (While DataReader.Read() ...)
Best Regards ,
Tiraman :-) Tag: Attention William Ryan eMVP Tag: 85732
batch query ?!
I just watch an overview of ADO.NET 2 on MSDN TV.
In that demo the SqlDataAdapter featured a batch mode where you cold submit
update of many line with one query.
(instead of the line by line update as now)
I thought it was a great feature.
Now in my own PocketPC database application (www.ihookdb.com :) I have my
own "data access layer" and I thought it would be nice to use batch update
too. (and because it's my code I could do it today :)
And there a few question came to my mind (on about how to do that)
1. I was thinking, oh well man, it's simple, just queue the query with ';'
in the middle.
but there is a problem
if I write
UPDATE MyTable (field1, field2) VALUES (@field1_1, @field2_1) WHERE
ID=@field3_1; UPDATE MyTable (field1, field2) VALUES (@field1_2, @field2_2)
WHERE ID=@field3_2;..... N times (where N is my batch size)
(notice I write @field_1 for 1st query, @field1_2 for the second, etc ...)
but what if I use a batch size of 100 and they submit only 3 line changes ?
should I create the query depending on the number of changes ?
how to do that cleanly ?
2. but there is worst !
lest say I do an INSERT with an ID Identity column, I should have a SELECT
@@IDENTITY after my insert. but what happened if I do many insert at a time
?!....
Any SQL Admin to rescue me ?!! Tag: Attention William Ryan eMVP Tag: 85726
How To Use Null ?
Hi ,
i would like to init an integer param to Null
dim x as integer
x = null
how can this be done ?
--
Best Regards ,
Tiraman :-) Tag: Attention William Ryan eMVP Tag: 85722
Oracle Client
Hi,
Anyone out there successfullly used the microsoft client to get data
back via a stored procedure?
If not, can the oracle client be used on 8.1.7?
The proc is simply 'get * from widget'
I have a cursor as the output parameter in the proc.
My addparameter command in .net is correct:
myDBNull = Convert.DBNull
strSQL = "proc_GetColWidths"
cmdConn = New OracleClient.OracleCommand(strSQL, New
OracleClient.OracleConnection(mstrConn))
cmdConn.Parameters.Add(New
OracleClient.OracleParameter("xx", OracleClient.OracleType.Cursor, _
2000, ParameterDirection.Output, True, 0, 0, "",
DataRowVersion.Default, myDBNUll))
cmdConn.CommandType = CommandType.StoredProcedure
cmdConn.CommandText = strSQL
cmdConn.Connection.Open()
cmdSource =
cmdConn.ExecuteReader(CommandBehavior.CloseConnection)
I get ora-06550 error when the executereader fires
Appreciate any help to sort this out.
Thanks
Bob Tag: Attention William Ryan eMVP Tag: 85704
Common Database Interface
I am trying to develop a program that would work with any database using
ADO.NET. I am having a hard time because of the differences in SQL syntax
between databases.
One example is when I try to specify the column name, some databases require
that I put the name between square brackets, others between quotes, etc. I
had a similar problem with data/time fields, but I could solve it by using
an algorithm with reflection and tags in the SQL sentences. I would really
appreciate if anyone could tell me if there is a standard syntax to specify
column names that all the databases should accept. At this point I concluded
that I will have to create settings in my program to enable the user to
enter with this format, but something automatic (as I found for date) would
be much better.
My deadline for this project is next week, so I would appreciate if anyone
could send me feedback as soon as possible.
Regards,
Lourenço. Tag: Attention William Ryan eMVP Tag: 85703
DataSet problems - selecting on aggregate functions
I have a dataset containing an already-populated single datatable which
I which to perform an operation on. The structure of the table is
below: Specifically, I want to get the most recent message for every
unique {Group, User, Subject} subject to TimeStamp being less than an
AsOfDate that is externally specified. I then want to bind this table
to a DataGrid. I am having trouble since I am used to Access queries
(new to the .NET arena), and do not know where to start.
TableName: Messages
Fields:
Group (String)
User (String)
Subject (String)
Message (String)
TimeStamp (DateTime)
Primary Key: {Group, User, Subject, TimeStamp}
Any help would be most appreciated. Thanks! Tag: Attention William Ryan eMVP Tag: 85698
Adding two a Datagrid
Hi all,
Ok I have a sub that creates a Datatable
loads some values then I bind it to a DataGrid to show
the user.
I later need to add values to the third Column in that datagrid?
Ok I tried a Global datatable but at the line where
Datagrid.Datadource = Datatable
it takes like 3 - 5 seconds?
thanks for any help
Gerry Tag: Attention William Ryan eMVP Tag: 85691
Type.GetType of Byte-Array
Hello,
I want to set the schema of a DataTable. It should have the same structure
than my Datatable in SQL Server. The last column is a Timestamp called
Stempel. Timestamp is treaten an a Byte-Array. What can I do to set the Type
for this column?
Dim myDataTable As DataTable = New DataTable("Adressen")
myDataTable.Columns.Add("ID", Type.GetType("System.Int32"))
myDataTable.Columns.Add("Vorname", Type.GetType("System.String"))
myDataTable.Columns.Add("Nachname", Type.GetType("System.String"))
myDataTable.Columns.Add("Stempel", Type.GetType("???"))
Thank you
Steffi Tag: Attention William Ryan eMVP Tag: 85684
Generate ADO.NET DataSet outside .NET Framework
Hi All
We have a big application server build using Delphi 7. Then, our idea is to
build a web tier (client) using ASP.NET / Web Forms. My idea: generate
manually a ADO.NET DataSet (XML) in Delphi 7, based in Delphi DataSets. How
Can I do this?
Thanks
Guinther Tag: Attention William Ryan eMVP Tag: 85674
What data object should I use with a DataGrid
I am creating a page that will use a DataGrid. It will display a list of
people. Each row will have an Edit button that will take the user to
another page where they can edit that particular record. Each row will also
have a Delete button that will delete the record. Should I use a DataSet as
the datasource of the Grid? Tag: Attention William Ryan eMVP Tag: 85672
OracleClient Connection string ..
I'm trying to connect to Oracle database in the asp.net app. But keep
getting the error:
"ORA-12154: TNS: could not resolve service name at
System.Data.OracleClient.DBProjectPool.GetObject(Boolean&isInTransaction) at
System.Data.OracleClient.OracleConnectionPoolManager.GetPooledconnection ..
"
==============
Here's the connection string I'm using:
dim sConn as string = "Data Source=DSNName;User
ID=username;Password=password;Integrated Security=SSPI"
Code to connect to the database:
imports system.data
imports system.data.OracleClient
imports system.configuration
dim objConn as OracleConnection = new OracleConnection
objConn.ConnectionString = sConn 'as defined above
Try
objConn.open
catch ex as Exception
response.write(ex.Tostring())
finally
objconn.dispose
End Try
==============
Also, I have given full control to the ASPNET account and the IUSR and the
IWAM accnt in the Oracle bin folder.
Can someone point out what's going wrong?
Thanks Tag: Attention William Ryan eMVP Tag: 85669
Subclass DataColumnCollection
Does anyone know how to subclass the DataColumnCollection asy like DataRow
where you can use a rowbuilder in the constructor?
thanks
Gerald Klein Tag: Attention William Ryan eMVP Tag: 85666
Typed DataSet Problem
Hi,
In my application I am manually adding a datarow (with user data not from
db) in a typed dataset. At that time the datarow row state is "Added" which
is correct. The problem I am running into is when I modify that row later
in the application the row state is still "Added" and not "Modified". Why
is this the case?
Thanks Tag: Attention William Ryan eMVP Tag: 85656
access query and DataAdapter have different data
I have a access query with 3 tables with left joins and some criteria conditions. Viewing the query in access 4 records are returned which is correct. If I use a .NET OLEdbAdapter to read the query I get only the first record in the .NET application. Many onther queries and tables work fine. It appears that the jet 4 connection to access can not be relied upon and access should not be used as an undelying application database. Has anyone seen simular problems or know a solution? Tag: Attention William Ryan eMVP Tag: 85642
Problem calling Fill() method
I have several tables involved in my application, but the two in question
here are the company and address tables. The company table has
business_address_id and mailing_address_id columns, which are both foreign
keys to the address table.
So, the stored procedure to which my SelectCommand points to reads as:
ALTER PROCEDURE dbo.CompanyInfoByCompanyID
(
@companyid int
)
AS
SET NOCOUNT ON
SELECT * FROM Company WHERE company_id = @companyid
SELECT * FROM Address
WHERE (address_id IN (Select business_address_id From
Company Where company_id = @companyid))
OR (address_id IN (Select mailing_address_id From Company
Where company_id = @companyid))
RETURN
Whenever I attempt to add a new row into the Address table using my
daAddress dataset, the update works fine and even enters a new row inside
the Address table. However, when I attempt to refresh my datagrid by
calling the Fill() method on the Address adapter I get the following error:
Exception Details: System.Data.SqlClient.SqlException: UPDATE statement
conflicted with COLUMN FOREIGN KEY constraint 'Address_Company_FK1'. The
conflict occurred in database 'OFS', table 'Address', column 'address_id'.
I placed the Find() call in a try/catch block, and upon closer inspection
discovered this error message:
DataSet errors: dsCompanyInfo
Table: Address
Row Error: Column 'zip' does not allow DBNull.Value.
Now, the zip column is indeed populated upon calling the Update() method,
and it is populated in the database. So I have no idea where this error
message is coming from.
Your assistance would be greatly appreciated,
Mervin Williams Tag: Attention William Ryan eMVP Tag: 85641
Clearing the pending results
I have a stored procedure. I calls some other procedures and then returns a
single result.
However, the other stored procs are returning rows that i don't need.
How do I clear the results so that the other value returned is the one at
the end of my proc?
thanks,
steven Tag: Attention William Ryan eMVP Tag: 85639
How does a DataReader work ?
Hi
I have a question on how the datareader work underneath when retrieving the records from the data source
Does the DataReader fetch one row of data everytime I call the Read() method or all the rows for the query is available in memory before I call Read() method ?. Tag: Attention William Ryan eMVP Tag: 85638
Update a Table using transactions
Hi all,
i have a problem with a transaction.i will tray to explain my problem.
i have a Dataset that i have fill using 2 DataAdapter with a simple query
( all tables with an autonumber).
i have made code for the dataadapter rowupdate to get the @@identity of my
table.
everything works fine.
now is the problem,
i have made a transaction to made this works,
when i do the endcurrent edit of my CurrencyManager, i want to submit the
row to the DataBase.
i have submited the first table and works fine
when i try to submit the second table it throws an exception.
after that every thing is ok
but when i press again the save button
when i´m going to submit the first table again it throws an cocurrency
violation, and the row state
of the row that i´m try to submit have changed the rowstate from Added to
Modified. anyone knows why ??
thsk
JSB
plsea see the code below
so i have made some thing like this
'update Function
dim cmd as SQlClient.CommandBulider ( DataAdapter)
dim cmd1 as SQlClient.CommandBulider ( DataAdapter2)
try
BD.Open
trans = bd.BeginTransaction
DataAdapter.update ( Ds,Table)
' some code that mades a error
' bla bla bla
' in this peace of code ocurs an Error that throws an Exception
DataAdapter2.update ( Ds,Table2)
trans.comit
catch
trans.rollback
finally
bd.close
end try Tag: Attention William Ryan eMVP Tag: 85635
how remove the + indicator from master datagrid
when i release my program with master-detail form,
i want to remove the (+) indicator from master datagrid.
how to do that? Tag: Attention William Ryan eMVP Tag: 85634
Create an empty datatable
Hello,
I'm a =2Enet (CF) newbie, and I have the followong problem:
I try to create an application in =2ENET CF using data stored in=
XML/XSD files for an iPAQ=2E
When I load an XSD file into a dataset i want to create an epmty=
table which structure was described in the xsd file=2E The only=
solution I have found is to load a "dummy" xml file with at=
least one record that match the table's structure and then call =
the "Clear" method for the table, but it's not very=
comfortable=2E=2E=2E
thanks for any replies in advance
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>SjnJkud1qECcBYOns4JUbQ=3D=3D</Id> Tag: Attention William Ryan eMVP Tag: 85628
Export to Excel and Single Quote problems?
Hi All,
I am exporting data from a dataset to an excel spreadsheet via OLEDB.
Everything works fine but one part.
All my cells have a single quote in the beginning of each piece of data. I
realize this is how Excel maintains the data as text; but I am wondering how
I can prevent this from happening at all.
Thanks,
John. Tag: Attention William Ryan eMVP Tag: 85617
difference between Integrated Security=True and Integrated Security=SSPI
Hi ,
Is there any difference between
Integrated Security=True and Integrated Security=SSPI?
The docs seem to indicate they are the same but i have seen different
behaviour when connecting to sql server using each in the connection
string.
All info welcome.
Regards
John Tag: Attention William Ryan eMVP Tag: 85615
have a memory database with ability of sql?
i need to build program that can connect to large DB or small one, according
user needs. but i whant that my program retrive data from tow resource in
same code of sql select.
i whant to manage data in memory, and save it like xml or somthing else.
but i need to use with sql selelect.
the dotnet offer only select method. but i want to use with standard sql.
in delphi i think that Datastore make this job. in dotnet have somthing
like? Tag: Attention William Ryan eMVP Tag: 85606
OracleCommadbuilder: Exception: Parameter 'p1': No size set for variable length data type: String.
When updating an Oracle Varchar2 column with an empty string "" using the
OracleCommandBuilder generated UpdateCommand the follwing error is thrown:
"Parameter 'p1': No size set for variable length data type: String."
Is this a bug in the OracleCommandBuilder? Is there an elegant workaround?
Updating with DBNull.Value instead of an empty string does not throw the
above error. Tag: Attention William Ryan eMVP Tag: 85605
nested table
nested table for what? how it's work.
i try to raed in msdn, and i make simple parent child table:
table aa
table bb
i drop bb table into aa table, i make simple form with tow datagrid, the
first one bind to aa and second to bb table.
i run the program, and i not see any liked between tow tables?? Tag: Attention William Ryan eMVP Tag: 85598
Closing Connections using ODP .NET
hi
I am using ODP .NET to connect to Oracle database. I have about 3000 users concurrently accessing the application. In the Code i am exclusively closing the connection and disposing the object. But sometimes, over 100 connections left unclosed and they all stay in 'INACTIVE' mode. I found this using TOAD. Why is this happening? Do i have to do something else for things to work properly? Please give me suggestions.
Thanks
-Imayakuma Tag: Attention William Ryan eMVP Tag: 85582
concurrency violation
(Type your message here)
--------------------------------
From: Adam Sim
Hello, I am trying to update the data in an MS Access table using a Visual Basic Windows Application. The way I tried to do it has worked in the past, but now it seems to give a "concurrency violation."
if either the starred lines is in the code it produces a concurrency error, if they are not it does not produce an error but, of course, the original data is not changed. I have checked my table in access and it seems that all the formats are correct.
Thanks for your help
Adam
Here is the code:
Note: selid is a public variable for the case number of the record being worked upon
Sub save_art()
Dim strConnect As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
& "C:\Documents and Settings\Owner\My Documents\Visual Studio Projects\mpqgrammar.mdb"
Dim cn1 As OleDbConnection = New OleDbConnection(strConnect)
cn1.Open()
Dim strSelectOut As String = _
"SELECT * FROM MPQFIN WHERE CASENO = " & selID
Dim dsOutCmd As New OleDbDataAdapter(strSelectOut, cn1)
Dim dsOutCmdBuild As OleDbCommandBuilder = New OleDbCommandBuilder(dsOutCmd)
Dim dsOut As New DataSet()
dsOutCmd.Fill(dsOut, "MPQFIN")
dsOut.Tables(0).Rows(0).Item("Done") = 1 '************
dsOut.Tables(0).Rows(0).Item("Coder") = userName '************
dsOutCmd.Update(dsOut, "MPQFIN")
cn1.Close()
MessageBox.Show("Record Saved!", "Save")
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>krPqOcIILU2g4f3FH0aqzA==</Id> Tag: Attention William Ryan eMVP Tag: 85578
Column reordering in DataTable
It sounds simple but I couldn't figure a way to do it.
All I want to do is re-order the columns on my DataTable. For example, I like to make the second column the last column, make the third the first, etc.
When trying to remove a column from the collection and then add it to back, the data inside it is lost.
Do you know any simple way to do this?
--------------------------------
From: Hanan Taiber
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>q6LLQcJf5E+9zelcYhLYjQ==</Id> Tag: Attention William Ryan eMVP Tag: 85577
New records not showing when using CreateChildView
I have a Dataset containing Parent and Child tables=2E If I add a=
new record to the Child table for an existing key, I would=
expect the CreateChildView method on the Parent row's=
DataRowView to return all existing child records plus the new=
one=2E However, it doesn't seem to recognise the newly added=
record=2E
If I create a DataView which is filtered using the foreign key=
expression the dataview contains the correct number of records=2E
/* Add new child row */
DataRow childRow =3D childTable=2ENewRow();
childRow["brokcode"] =3D "ABED";
childRow["lgencode"] =3D "DUM=2EL";
childTable=2ERows=2EAdd(childRow);
childTable=2EAcceptChanges();
/* Print Child Record Count using CreateChildView - Doesn't=
include new childRow*/
DataView childView;
DataRowView drv =3D childTable=2EDefaultView[0];
childView =3D drv=2ECreateChildView("broker-broker_legal_entity");
Console=2EWriteLine("CreateChildView Record Count: " +=
childView=2ECount);
/* Print Child Record Count using DataView - Does include new=
childview*/
DataView dataView =3D new=
DataView(childTable,"brokcode=3D'ABED'","",DataViewRowState=2ECurren=
tRows);
Console=2EWriteLine("DataView Record Count: " + dataView=2ECount);
Whilst I can create a DataView using a RowFilter expression I=
would rather delegate that functionality to CreateChildView=2E=
Does anyone know if this is a bug or is there something else I'm=
missing=2E
Thanks
Paul Greer
Barclays Global Investors
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>eQRid+xG20m1LWpdZsRUkw=3D=3D</Id> Tag: Attention William Ryan eMVP Tag: 85576
enter
(Type your message here)
--------------------------------
From: Huang Xin
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>iP6RNtSzdkW07pQ3z9tsFw==</Id> Tag: Attention William Ryan eMVP Tag: 85575
Bill,
You were helping on a thread in this group: "Typed Dataset Problem" and
posted a reply to your post and I was hoping that you could reply to it.
Check the thread, I responded and I think if I understand you correctly it
should be fixed.
Sorry for any delay.
Bill
"Sarah" <Sarah@nospam.com> wrote in message
news:#kc8ak6KEHA.3808@TK2MSFTNGP12.phx.gbl...
> Bill,
>
> You were helping on a thread in this group: "Typed Dataset Problem" and
> posted a reply to your post and I was hoping that you could reply to it.
>
> Thanks
>
>