FYI - Alternative DB engine for .net
I found a alternative DB engine for .net suited stand alone apps that
may not wish to use Jet or MSDE. I have not used it so can not
comments on stability.
Comes with source code and a license to allow use in commercial
products.
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ea06f702-480a-4b60-8402-70b27c6472dd Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112872
Help - MSDE or Jet for Stand-alone App,
I am converting a older VB app to .net. The app currently strores
info. Into a JET database. As this is an end user app, I can not
convert to SQL server, etc. so I need to use either the older Jet
engine or using MSDE.
Questions:
Issues with loading MSDE on a neophyte user's machine. Will it
require user tweaking and will it effect their system performance?
Also, will they need to install as ADMIN?
Also, if multiple people need access to the same database, will MSDE
need to be installed on all of the machines and can it access the same
database file on a network drive? Or will one machine need to be
designated as the DB server? Eg. Time for SQL server?
If one is running SQL server 2000, can the databases be used by MSDE?
If not, where can find info on what changes need to be done?
What is the current stability state of the Jet engine. I know that
the pre-4 versions had data corruption issues. Did version 4.x fix
most of these issues?
Thanks
P.S.
Any recommendations for a good tutorial on installing MSDE on the
target machine and replicating the database files would be helpful. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112865
SQL Server SPIDs
Hello, I don't know much about SQL Server processes/SPIDs but everytime our
web app creates a ADO.NET connection and closes it, the SPID is still hanging
around in "sleeping status" well after it's closed in the ADO.NET code.
Is this normal or I am making database calls inefficiently?
I also thought mutiple connection w/ the exact same connection string
becomes pooled. If pooled, will that not affect the number of SQL SPIDs
created.
Should I be concerned about the number of SPIDs the app is producing or is
this normal?
Thanks in advance,
Jim Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112854
Database query performance
I have a database table. The table has number of fields. Out of those fields
one is Company and
another is DateTime. The table has thousands of records. I want to get the
most recent
record for each company. In order to do that I am using the following query
SELECT * from CompanyDetail AS X
WHERE [DateTime]=(SELECT max([DateTime]) FROM CompanyDetail WHERE
Company=X.Company)
ORDER BY Company
Note: There is only one record exists for the given company on a given date
The problem is that this query is very slow. Am I doing something wrong or
there could be another
alternative way to improve it ?
Thanks in advance
KDV Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112850
ERROR [42724] - .NET to DB2 via Managed Provider
The complete error is at the end of this cry for help.
I've been tasked with hooking an interface in ASP.NET and a handheld (via
web services) to an existing DB2 data store. The requirement for real-time
data submission is driving the development, and all is going well, In fact,
the managed provider is working perfectly to execute stored procedures to
read from the data store, both ones that have no parameters (simple lookup
lists), lookup lists that are pre-filtered with parameters, and ones that
use identity columns to pull editable records. Performance is fine, and
everything on the interface side is great.
BUT (always is one), I get the same basic error (see below) every time I
execute a stored procedure that inserts or updates a record. These same
procedures all work perfectly from inside the command editor, and the logon
to the data store there is the same as the one in the .NET development
environment (to eliminate permissions issues). Yet, the error is pulled
every time, and being somewhat of a newcomer to the DB2 world, I expect it
is probably looking me right in the face.
The code accessing the stored procedure is almost identical to the read
code, rendered in VB.NET, and patterned after examples on the IBM sample
set.
Absolutely any insight, even where to look to resolve this, would be highly
appreciated. Thanks.
Frank Buchan
***ERROR DETAILS BELOW***
ERROR [42724] [IBM][DB2/NT] SQL0444N Routine "*ERT_DEST" (specific name
"SQL050622125403880") is implemented with code in library or path
"...2.V1_INSERT_DEST", function "MDM2.V1_INSERT_DEST" which cannot be
accessed. Reason code: "4". SQLSTATE=42724 Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112849
Huge data needs to be transfer from Fixed width Text File to SQL S
Hi Experts,
I have huge fixed width text files around 9GB or 60 TO 75 millions records.
I need to transfer 300GB data from these Text files to SQL Server 2000
monthly bases. I am trying to develop VB.NET application. One problem is I
need to transform this data, like date is 6 char (mmddyy) which needs to be
convert into real Date (mm/dd/ccyy) during the import. I tried to use
datareader to bring data into DataTable and then append data into SQL Server
using SQLBulkInsert but its taking long time and start failing after 10-16
millions records appended into SQL Server 2000 table.
I have following questions:-
1- Which class-method should I use to read the data from text file?
2- How to perform Transformation data ( like converting 6 char date fields
into DATE and other validations)?
3- Which Class-method should I use to append data into SQL Server 2000 to
get the best performance?
4- Is there any better way to done the same job?
I am using VB.NET 2005 Beta.
Thank you so much for your time and help.
Some code what I am using right now to do so
Using rdrDataFile As New TextFieldParser(mstrDataFilePath)
rdrDataFile.TextFieldType = FileIO.FieldType.FixedWidth
rdrDataFile.SetFieldWidths(objDataFile.SplitPositions)
arrNumToExclude.AddRange(objDataFile.ColumnIndicesToExclude)
tblDataFile = objDataFile.StagingTable
Dim currentRow As String()
Dim rowIndex As Integer = 0
destConn = New SqlConnection(strConnectionString)
'Creates Connection
destConn.Open() 'Opens Connection
' intTotalRowCount = 1
While Not rdrDataFile.EndOfData
Try
Dim myRow As DataRow = tblDataFile.NewRow
currentRow = rdrDataFile.ReadFields()
Dim currentField As String
Dim columnIndex As Integer = 0
Dim intCounter As Integer = 0
For Each currentField In currentRow
If Not arrNumToExclude.Contains(intCounter)
Then
myRow(columnIndex) =
objDataFile.FormatData(columnIndex, currentField)
columnIndex += 1
End If
intCounter += 1
Next
tblDataFile.Rows.Add(myRow)
Catch ex As Exception
End Try
rowIndex += 1
If rowIndex = 100000 Or rdrDataFile.EndOfData Then
'Upload data To Database in Batches
BulkCopyToDB(tblDataFile,
objDataFile.DestinationTable) 'Copy Data into DB
tblDataFile.Clear()
rowIndex = 0
End If
'vpbDataFile.Value = IIf(intTotalRowCount <
vpbDataFile.Maximum, intTotalRowCount, vpbDataFile.Value)
'intTotalRowCount += 1
End While
End Using
Public Sub BulkCopyToDB(ByVal vtblDataFile As DataTable, ByVal vstrDestTable
As String)
Dim bcp As SqlBulkCopy = Nothing
Dim strConnectionString As String = ""
Try
bcp = New SqlBulkCopy(destConn)
bcp.DestinationTableName = vstrDestTable
bcp.WriteToServer(vtblDataFile)
Catch ex As Exception
Finally
If Not bcp Is Nothing Then
bcp.Close()
End If
End Try
End Sub
Regards,
-Permood Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112847
retrieve id when adding a new record in SQL
Hello,
Iâ??m adding a record to a SQL database. One of the columns in the database
generates a uniquely identifying integer when a record is added. I would like
to retrieve this number when I add a new record to the table. By the way I do
not want to use stored procedures.
Iâ??m using the following VB.NET code to add a record to a database how would
I change this so that at the same time I can retrieve the unique record id
generated by the database in the table?
Imports System.Data.SqlClient
Dim conDB As SqlConnection
Dim strInsert As String
Dim cmdInsert As SqlCommand
conDB = New SqlConnection("connection string")
strInsert="Insert Products (ProdName,ProdCat) Values ('Flat Chair',â??Chairâ??)"
cmdInsert = New SqlCommand(strInsert, conDB)
conDB.Open()
cmdInsert.ExecuteNonQuery()
conDB.Close()
Thank you. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112845
Pivoting DataSet
I currently have from SQL a stored procedure that is vaguely doing something
like:
SELECT
FormName,
frmDueDate,
DepartmentName,
Country
frmStatus
FROM
wholeBunchOfTables
So data will be returned like:
Form1 ITDept USA Incomplete
Form2 ITDept UK Completed
Form1 HRDept FR Completed
Form2 HRDept FR Missing
The DataSet resultant from the Stored procedure execution is binded to a
sortable DataGrid. However, I would like the data "pivoted":
i.e.
Form1 Form2
ITDept USA Incomplete Completed
HRDept FR Completed Missing
Is this at all possible (natively)??
- Can't think of any pivoting SQL operators??
- Can't pivot on ASP.NET/ADO.NET?? Would I have to resort to
--- creating another DataSet with columns pivoted?? or
--- render my own table, etc. and handle by own sorting? Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112844
Bug in framework?
I'm having a very funny behaviour in my application.
My windows App running on XP sp2, has data from various table.
If I make changes to only 1 table on the form and click save, it gives an
error:
"Object reference not set to an instance of an object."
If I debug the code, it crashes on the line with "*" (I'm showing the code
above, so that it would give a better idea)
public void UpdateDataSet()
{
// Create a new dataset to hold the changes that have been made to the main
dataset.
ClientManagementPro.dsClientT objDataSetChanges = new
ClientManagementPro.dsClientT();
// Stop any current edits.
this.BindingContext[dvClient,"relClient-ClientAddress"].EndCurrentEdit();
this.BindingContext[dvClient,"relClient-ClientNote"].EndCurrentEdit();
this.BindingContext[dvClient,"relClient-Action"].EndCurrentEdit();
this.BindingContext[dvClient,"relClient-Child"].EndCurrentEdit();
this.BindingContext[dvClient,"relClient-Job"].EndCurrentEdit();
this.BindingContext[dvClient].EndCurrentEdit(); *
<------------------- It crashes here (mind u dvClient is the only thing
that is modified).
Now, after it gives that error, if I click save, it goes through just fine!
Again this only happens sometimes, if I edit the same fields on the same
tab, it works just fine.
I'm completely lost here and have no clue how to troubleshoot this, any
insights would be highly appreciated.
Thanks
HS Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112840
Write a XML file without accents
Hello,
I have a problem and I think that someone can help me.
I am writing a XML file using data from a Oracle data base. I am from
Brazil, and here we have accents on the words, like "acentuação".I need write
my XML file without the accents. Today I am using one DataSet to write my
XML, specifically the method WriteXml.
How can I resolve my problem, using a feature from the .NET Framework?
Thank's
--
Tiago Machado
Microsoft Certified Professional C# .NET Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112839
DataGrid control scrolling
Can I programmatically control the scrolling of DataGrid control in Windows
Forms. I have DataGrid control which shows hundred of rows. I want a way of
scrolling the data grid to last row
KDV Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112837
wizard-generated stored procedure for Null-Guid-Column
Hi,
- occurs with .Net 2.0 Beta 2 -
I have a typed-DataSet and some DataAdapters to provide the tables for the
DataSet. When I create the stored-procedures with the DataAdaper-Wizard for
a table with a Guid column, which can be NULL, the Wizard generates a wrong
Script. (only when "use optimistic concurrency" is true).
If you look at the script, the following part of the where-clause is faulty
...((@IsNull_FieldName = 1 AND [FieldName] IS NULL) OR ([FieldName] =
@Original_FieldName))...
(FieldName is defined as uniqueidentity, allow NULL)
obviously @IsNull_FieldName = 1 is wrong, because 1 is an Integer and not a
uniqueidentity.
But how to fix that?
regards Gunnar Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112834
Poor DAB performance
I recently came across the Microsoft Data Access Application Block so I
decided to try it out in a Windows forms application. Without using the
DAAB, the following code, which creates a data reader which is then
used to populate a combo box, takes 3 seconds to run:
SqlConnection cn = new SqlConnection("server=.......")
commandString = "select ......"
SqlCommand cmd = new SqlCommand(commandString, cn);
SqlDataReader dr = cmd.ExecuteReader();
The command string is a simple select statement on one table which
returns the primary key for about 10 records.
After installing the DAAB I modified the code as follows:
Database db = DatabaseFactory.CreateDatabase();
commandString = "select ......"
DBCommandWrapper dbCommandWrapper(commandString);
IDataReader DataReader = db.ExecuteReader(dbCommandWrapper);
This code takes 6 seconds to run, twice as long. I can see the
advantages of using the DAAB, but this performance overhead is too
great. Is this to be expected when using the DAAB or am I missing
something? Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112827
Exception on SqlTransaction.Rollback(), BUT it doesn't
Hi,
My program injects message at the same time as SQLServer is backing up
(full).
I write injecting module using Try...Catch block with SqlTransaction and
using SP.
Within Exception block I call Rollback() (it cautch timeout exception). I've
found that
it got exception on Rollback() command with InvalidOperationException
(message="This SqlTransaction has completed; it is no longer usable."). In
this
situation, sometime the message is right (inject success), but sometime it
doesn't.
How can I resolve this problem?
Thanks in advance,
Thana N. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112819
SQL CLR: which assembly to reference for microsoft.sqlserver.serv
I am trying to use objects (such as sqlcontext) defined in the
microsoft.sqlserver.server name space, but couldn't find the right assembly
to reference. Does anyone know which assembly implements the classes
defined in this name space? Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112816
Trying to find ClientID of web form - Solution Found
After pouring over about a dozen sites that clearly dealt with ClientID
all by itself, I came to the realization that about 2/3+ of them were
doing it wrong. It is indeed impossible to grab the Client ID of a form
field from within a DataGrid like this: <%= FormFieldID.ClientID %>. At
least, not without extra work.
How did I do this? I created a new DataGrid from scratch, with a form
above it and a form inside of it. This was a page about 50 lines long -
so, very short - with no user dependencies except for the initial
loading of the DG with content from the DB.
While I was able to get the ClientID of the form that was outside of the
DG, I was unable to do so for any form fields inside of the DG using <%=
FormFieldID.ClientID %>. Doing so threw the error.
That got me to thinking. Which, after nearly two days of rest from the
subject, was a wee bit clearer than before Sunday.
I decided to call the form field directly. I first Dim'd a name as a
textbox, and then I called the right textbox by catching it when the DG
was being created. Since it was in the footer (the footer is an "add"
row) simply calling like this:
Dim add_Date as TextBox = e.Item.Cells(1).FindControl("add_Date")
was a bit difficult. Which row would be referenced? How would the script
know to look in the footer? Since the footer comes and goes (I don't
need it during an edit), looking for it would have to be conditional.
In order to catch the right row (the footer) while the DG is being
built, I added a feature to the DataGrid itself (onItemDataBound =
"dg_ItemDataBound") which calls the sub dg_ItemDataBound when the
DataGrid is being built.
From here, I created a Sub (Sub dg_itemDataBound()) in which I
contained my attempt to find the ClientID of the form field within the
footer:
If e.Item.ItemType = ListItemType.Footer And dg.ShowFooter = True then
Dim add_Date as TextBox = e.Item.Cells(1).FindControl("add_Date")
End If
From here it was pretty easy to set up a RegisterStartupScript (inside
the IF) that made use of add_Date.ClientID. Since I had already defined
add_Date as the form field called "add_Date" in the second cell of the
footer row, the usage of add_Date.ClientID no longer threw an error.
I also had to implement this within the dg_Edit() Sub, in a slightly
different fashion, but that's because I allow rows to be edited.
***
What is really strange is the sheer number of sites that claim that
using <%= FormFieldID.ClientID %> will actually work inside of a
DataGrid without further modification or code. It certainly didn't work
for me.
I would also like to apologize to the community at large for my hissy
fit on the weekend. It had been a very long week, this was just one of
many problems I was still trying to solve, and Juan's reply seemed to be
mocking me for my lack of progress. Normally I'm much more mild
mannered, but something in me must have snapped from all the stress.
That should not have happened.
Gomen dasai.
TIA
...Geshel
--
**********************************************************************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
********************************************************************** Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112801
minumn and maximum
what is the mininum and maximum value in SQL statement
select * from table1 where field1 between "minumum" and "maximum"
then it will show up all the value in table1
thank
regards Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112800
Datasets and identities in ADO.NET 2.0
Hi to all, I'm developing a test application with Visual Studio 2005 Beta 2
and the 2.0 framework (along as SQL Server 2005 June CTP), and I'd like to
know if they introduce some improvements in order to solve an old problem:
how to deal with inserting values from a DataSet into two related tables
when one of them has an auto-generated ID column.
Let's say I have these two tables in the DB, Table1 and Table2, and Table1
has an "ID" column which is configured as an auto-generating identity;
Table2 also has an ID column, which references Table1.ID in a foreign key
relation.
Now, I'm loading these two tables in a typed DataSet, which, being typed,
knows the structure of the tables and the relation between them; I put a new
row into Table1, and then another one in Table2 referencing the new
Table1.ID.
The question is: how do I put those new data into the DB, since I can't
specify the value of the column in the master table?
I know there are some workarounds for this problem (like retrieving the new
auto-generated ID and storing it in the DataSet, or using stored procedures
to update the tables, or using placeholder values in the DataSet before
submitting the changes, or using GUIDS), but I'd like to know if ADO.NET 2.0
solves this problem in a more elegant way than 1.0 and 1.1 did; the new
framework has so many improvements... this one would be quite helpful.
Thanks for any answer.
Massimo Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112794
DataView.AddNew for child table Causes index out of bounds
I've bound the data grid (windows forms) to two related tables, at the
top Clients, and below the Jobs for that client. Most works well except
if one deletes all jobs for a given client, and then goes to add a new
one. The DataView.AddNew causes an index out of bounds exception. It
would appear from the stack that the grid is attempting to paint row #0,
which of course does not exist yet (not until I finish filling out the
DataRowView, and call drv.EndEdit).
I have tried suspending layout during the add, but no help.
I unbound and attempted to rebind after the add, which avoids the
exception, but once I rebind I am not able to see how to navigate back
to the newly created row in the child table. I end up at the job for the
first client. I don't see how to tell what row # to use to get to the
newly added job.
Banging my head on the wall until bloody. Googling until my fingers are
raw. I see others reporting problems such as this, but no one seems to
know the answer. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112786
DataTable.Select method bug in .Net Framework 1.1 SP1
Since Microsoft removed the original thread from this newsgroup... here it is
again.
Just to add some comments: we are MSDN Universal Subscribers and didn't get
support from Microsoft. We are being ignored for almost 5 months. We have
tested Microsoft .Net Framework 2.0 Beta 2 and the problem is still there.
This is worst than a virus and Microsoft does nothing.
By the way: did you know that Windows 2003 SP1 installs .Net Framework SP1?
You can't find this information in any of Microsoft's documents about the SP1
of Windows 2003 but it does...
Has anyone from Microsoft the decency to answer this post and to solve this
problem?
Here is one of the original posts (25/02/2005):
There is a bug in .Net Framework 1.1 SP1 with the DataTable.Select method.
Microsoft's description of the problem may be found here
http://support.microsoft.com/default.aspx?scid=kb;en-us;891742
and you can ask for a fix to that issue. The problem is that the fix does
not work properly!
Some problems were solved with this fix but some persist. And the problem
relates to the overload of DataTable.Select with a filter and a sort
expression: in that case the result of the method returns rows that do not
meet the filter conditions.
We have a detailed description of this problem at :
http://pwp.netcabo.pt/0434926301/
and have included a new test harness (source code included) to test the
problems we are experiencing.
As we can't tell for sure what gets solved and what doesn't with this fix we
decided to continue limiting the support for our applications for clients not
running the SP1 of the .Net Framework 1.1.
The purpose of this thread is to notify microsoft for the problem so that an
effective fix is released and to alert the developer community for this very
harmful bug.
The first thread I know of reporting this problem dates from 9/9/2004 and
Microsoft still hasn't fixed the problem... Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112780
TRANSFORM statements in ADO (Excel)
I require a report (in Excel) using data stored in Excel whcih uses the
PIVOT/TRANSFORM SQL function. I've attempted this in ADO as unfortunately
the Pivot Table function in Excel doesn't appear to be able to support my
complex calculation (Sum(AVE)/Sum(Amt))
My connection string etc works - But the SQL string is rejected error.
Basically the query reads as follows:
TRANSFORM (Sum([Ave])/Sum([Amt])) AS EXP1
SELECT [Deal Type], Subbranch, Ccy
FROM [Group Data$]
GROUP BY [Deal Type], Subbranch, Ccy
PIVOT Sheet;
I could build this in Access (as I know it works there) but I've started in
Excel and I thought ADO could handle this.
however I get an error message saying
"Jet engine does not recognise the field name sheet" (abreviated version)
Any help would be much appreciated.
Kind Regards
Rob Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112779
Delete DataView rows from DataTable (should be simple)
I'm using vb.net, but if you only have a c# answer, feel free to offer it!.
Anyway, I have a DataTable and a DataView which is a subset I have ID'd
to be deleted from that DataTable. I tried looping through the DataView
and deleting rows like this:
Dim dvAuto As New DataView
dvAuto.Table = dtCart
dvAuto.RowFilter = "AutoAdd = True"
If dvAuto.Count > 0 Then
Dim dr As DataRow
For Each dr In dvAuto.Table.Rows
dr.Delete()
Next
End If
But obviously it didn't work. I suspected modifying a collection while
looping through it would be a no-no and I was right (but tried anyway).
Without being able to issues a SQL delete like:
delete from dtCart where AutoAdd = True
I'm just not sure how to do this. How is this typically done? Thanks!
Matt Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112777
Update Server through webservice problem
I've been using the example posted at
http://support.microsoft.com/default.aspx?scid=kb;en-us;310143 to build a
disconnected dataset that updates SQL Server through a webservice.
However, the code above doesn't seem to work for inserts or deletions.
Because my tables have autoincrementing primary keys (in the database and
the dataset) I've used the recommendation for the dataset to set the autoinc
seed to 0, and the step to -1. The means that my client dataset has primary
keys like -1, -2, etc. for new records. When I update the server, the
server-side dataset gets it's ID's updated by the insert stored procedure.
When I merge back this server side data set with the client one, new rows
appear twice in the client-side dataset. Likewise, when I delete records
from the local dataset, the changes get sent to the server side dataset.
The server code deletes the appropriate records from the database, and those
rows are removed from the server-side dataset by DataAdapter.Update(). When
I merge back this server side dataset back to the client dataset, the
'deleted' rows remain in the client dataset.
Everything in the database is correct, but the client side dataset is
completely out of sync with what is in the database. The only solution I
can think of is on the client side to confirm that all updates went ok. If
they did, then I'll RejectChanges on any new rows in the client dataset, and
AcceptChanges() on any deleted rows in the client dataset. Then, I'd merge
back the server side dataset to get any updates that were done. Is this the
only way to do this? There must be an easier, built in way to handle this
(aside from reloading the whole client dataset from the server).
Thanks. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112768
ado.net unable to connect from Windows 2000 after SQL server Resta
After restarting my SQl Server instance my ASP.net applicaions running on
Windows 2000 are unable to connect to the SQL Server. My asp appplications
are still able to connect
The connection string I am using is
user id=sa;pwd=????;data source=????;persist security info=False;initial
catalog=DBNAme
My clients running on Windows 2003 Server are still able to connect after
the restart.
I have tried the following:
Restarted the 2000 Machine hosting the client with no resolution
Changed the "data source" parameter to use the ip of the database server
rather than the DNS name with no resolution.
Added an entry in the ODBC Data Source Administrator for the server on the
2000 Machine with no resolution
I am able to ping the Database server and access it from Query Analyser from
the 2000 servers.
I was wondering if anyone has come across a similiar problem or if anyone
has any pointers as to what other changes to try??
Thanks,
BArry Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112765
Is this a good application Design?
Hello,
Currently my application has three tiers-
1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in this
tier. This tier exclusively gets DataViews/ Arays/Lists as input. Outputs
are string objects with SQL Statements or just paremeters with
dataconnection key.
2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is absolutely no
UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables. There is
just one DatabaseGateway class which does all the functionality.
3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just feel
that his framework is unnecessarily complex. I just dont see the need to
hold these intermediate Business Objects.
Thanks for your responses.
--
Jay Balapa
Director Of Software Engineering
www.atginc.com Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112742
Oracle and .NET stored procedures returning dataset...
Hi,
How can I return a DataSet from oracle stored procedure(that returns for
example, the customers from Brasil) to my ASP.NET application
In Sql server is easy.. and seens like this:
------------ into sql
Procedure SP_cursos (@categoriaID Int)
As
Select ds_curso from curso where ID_Categoria = @categoriaID
------------------------ into my .net class
Dim dsCursos As New DataSet
Dim daCurso As New OleDbDataAdapter
daCurso.SelectCommand = New OleDbCommand
daCurso.SelectCommand.Connection = objConn
daCurso.SelectCommand.CommandText = "SP_Cursos"
daCurso.SelectCommand.CommandType = CommandType.StoredProcedure
Dim objParam1 As New OleDbParameter("@categoriaID", SQLDBType.Int )
objParam1.Direction = ParameterDirection.Input
daCurso.SelectCommand.Parameters.Add(objParam1)
daCurso.Fill(dsCursos, "cursor")
ddlMiniCursoOpcao1.DataSource = dsCursos
ddlMiniCursoOpcao1.DataSource = dsCursos.Tables(0)
ddlMiniCursoOpcao1.DataTextField =
dsCursos.Tables(0).Columns("ds_curso").ColumnName.ToString()
ddlMiniCursoOpcao1.DataValueField =
dsCursos.Tables(0).Columns("cd_curso").ColumnName.ToString()
ddlMiniCursoOpcao1.DataBind()
Best Regards,
Ricardo Magalhães Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112741
Problem with varcharData
Hi !
I have problem to extract data from a DB when there is a filed "Varchar"
with more or equal to 1000chars !
I don't understand why !
I add parameters like:
prmOleDb = New OleDbParameter()
prmOleDb.Direction = oParam.Direction
prmOleDb.ParameterName = oParam.Name
prmOleDb.Value = oParam.Value
prmOleDb.IsNullable = oParam.IsNullable
prmOleDb.DbType = oParam.DBType
If oParam.Size > 0 Then
prmOleDb.Size = oParam.Size
End If
cmdOleDb.Parameters.Add(prmOleDb) Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112737
Serialization problem with SqlError
Deserializing SqlExceptions on Windows XP (SP2) originating from a Windows
Server 2003 SP1 machine is problemetic. It may generate the following
exception:
Exception: System.Runtime.Serialization.SerializationException
Message: Member name 'System.Data.SqlClient.SqlError server' not found.
Source: System.Runtime.Serialization.Formatters.Soap
at
System.Runtime.Serialization.Formatters.Soap.ReadObjectInfo.Position(String
name)
at
System.Runtime.Serialization.Formatters.Soap.ReadObjectInfo.GetType(String
name)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseMember(ParseRecord pr)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Parse(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.EndElement(String
prefix, String name, String urn)
at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler)
at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream
serializationStream)
I have found out that this is due to an incompatibility between the
System.Data assemblies on both machines. The following assemblies are
installed on both machines:
* Client: Windows XP SP2, System.Data.dll (v1.1.4322.2032)
* Server: Windows Server 2003 SP1, System.Data.dll (v1.1.4322.2300)
A SqlException that is thrown on the Windows Server 2003 SP1 machine
contains an error collection of type SqlError. Such an error will be
serialized like this:
<a3:SqlError id="ref-18"
xmlns:a3="http://schemas.microsoft.com/clr/nsassem/System.Data.SqlClient/System.Data%2C%20Version%3D1.0.5000.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<source href="#ref-15"/>
<number>50000</number>
<state>1</state>
<errorClass>16</errorClass>
<server id="ref-19">PC1882</server>
<message id="ref-20">-Message here-</message>
<procedure id="ref-21">-Procedure here-</procedure>
<lineNumber>24</lineNumber>
</a3:SqlError>
If the same exception is thrown on a Windows XP SP2 machine, then the
<server> tag is missing. This may seem strange, because the Server property
does exist in the v1.1.4322.2032 version. I started Lutz Roeder's .NET
reflector and it shows that the Server property is some kind of stub that
always returns an empty string. There isn't a server field in the class and
it cannot be set by the class' constructor. This explains why it is not in
the serialized message.
If you load the Windows Server 2003 SP1 assembly into the .NET Reflector,
then there is a server field and the server can be set in the constructor.
When the SqlError is constructed, then the server is saved into the field and
returned when the Server property is requested. This explains why it is in
the serialized message. It is good to have the server property in there, but
it is annoying that it isn't compatible anymore.
The Windows Server 2003 SP1 machine serializes the SqlError and includes the
server tag. The client deserializes the message and encounters the server tag
and doesn't know what to do with it and generates the exception listed above.
Although I can explain what is happening, I cannot solve it (yet). I am
currently working on a solution for this problem, but for now I can only
explain what is happening. For anyone else out there that is facing the same
problem it might be nice to know what is actually happening.
It worries me, that although the version numbers are the same (only a
difference in buildnumber) causes these kind of problems. I thought the
versioning issues would have been resolved with .NET. I hope someone can
bring up a solution. I really don't like to implement my own
SerializationBinder to solve this issue (that is what I am thinking of right
now). Can someone please respond to this issue?
--
Greetings,
Ramon de Klein
(Ramon.de.Klein@ict.nl) Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112727
view vs sproc
i have a query containing inner joins....i use it to populate my truegrid.
which better way of executing my query? make a view of it or make a stored
procedure of it?
im using a dataset and dataadapter to populate a datatable to be bind as the
datasource of my truegrid.
can you suggest a better(optimize) way of doin it?
--
rad Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112726
sql group problem
Hi All
Using VB.net 2003 and ADO.Net with MS Access 2003 database
I want to retrieve records grouped by time, but grouped within 1/2 hour
increments
The program is for a gym membership and I display graphs of the number of
sign-ins by members over the day
The gym uses this info to roster their staff according to the busiest times
of the day
The sql statement below returns the data but based on actual entry times.
sql = "Select mytime, count(mynumber) as amount from [attendance] where
[mydate] = #" & Format(CDate(Freports.dg2(Freports.dg2.CurrentRowIndex, 0)),
"MMM d, yyyy") & "# group by [mytime]"
I would like to reduce this by grouping attendance into 1/2hr groups, so the
graph is not so cluttered
e.g entries of 5pm, 5:03pm, 5:10pm, 5:15pm would be grouped as say 5pm
Any ideas
Regards
Steve Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112721
CancelCurrentEdit doesn't
Hi
Using Windows.Forms in ADO.NET in VB.NET 2003.
I have 3 dataviews of the same datatable in a dataset, each a subset of the
datatable by means of rowfilter. for example:
Me.dv1 = New DataView(myDataTable)
Me.cm1 = Me.BindingContext(Me.dv1)
Me.dv1.RowFilter = "Actions LIKE '%(1)%' AND Condition = 1"
Me.dv2 = New DataView(myDataTable)
Me.cm2 = Me.BindingContext(Me.dv2)
Me.dv2.RowFilter = "Actions LIKE '%(3)%' AND Condition = 1"
Each dataview is bound to it's own datagrid.
Editing data within the datagrids updates the current version of the row and
not the proposed version, and hence the CancelCurrentEdit on the
CurrencyManagers does not work.
Any help would be much appreciated.
--
Many Thanks
Terry Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112718
OleDb: Get Properties
Hi,
how can I get properties in ADO.Net? I read about it in the OleDB
documentation (Chapter 14: properties) but I can not find out how to get
them in .Net using an OleDBConnection. Any ideas? I searched "everywhere"
but without success. Currently, I'm trying to get the information from the
DBPROPSET_JETOLEDB_COLUMN property set:
http://msdn.microsoft.com/library/en-us/oledb/htm/oledbprovjet_provider_specific_properties_in_dbpropset_jetoledb_column.asp
Also with other providers, I have no clue how to get properties.
I have the GetOleDbSchemaTable method. I can use it only to get schema
information (which is no problem) but not those properties.
Armin Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112717
Cloning Datasets but also filtering
Hi,
I have 2 Datasets with 20 tables.
Ones called Surveys and the other SingleSurveys.
Surveys contains ALL survey data (IE SurveyID = 1,2,3,4,5......). All
tables have related ID field (IE SurveyID on each table)
I need to copy over to SingleSurveys only one survey data (IE SurveyID = 12)
The SingleSurvey should contain all the same tables, but filtered fields by
the SurveyID.
Is there a fast way to do this? Dataviews?
I have investigated some components but the seem to put all the data in 1
table. I need the same structure just data pertaining to a certain
surveyID?
Thanks Daren Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112705
dataset merge with itself
I am trying to create a dataset with multiple records that hold identical
data by merging a dataset with itself. I don't think this will work and I am
looking for other solutions.
For example, a dataset has a parent table called CATEGORY and a child table
called ITEMS. There is a primary key column and the value is -1 for the
parent (and child refers to row -1). Now I want a dataset that has 3 records
with this same information. I want row -1, -2, and -3 all with the same
values. I don't think Merge is what I am looking for because when the dataset
tries to merge with itself, the primary key of -1 is the same and instead of
adding a new row with primary key -2 it merges (imagine that) which results
in still only one row. Does anyone have a better solution to this? Otherwise
I need to manually create all the tables and rows by looping through the
original dataset. Thanks. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112703
Operator '=' on System.DateTime and System.Double
I'm developeing a small app based on the Visual Studio Beta 2 and the
DataGridView.
I'm trying to add a new row to a datatable programmatically and I keep
getting a strange error about not being able to use the '=' operator
between a System.DateTime and System.Double. I do not have a double
anywhere in my datatable and I've checked multiple times to make sure
that I'm passing the right value to the addnew method. Is this a MS
bug? Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112701
from mm/dd/yyyy to yyyy/mm/dd
The date in my application is in mm/dd/yyyy format which i use in query
to access data from a mini system on network having data in yyyy/mm/dd
format.How can i change my date into yyyy/mm/dd format in query to get
the result.Or tell me any other solution other than changing the Date
Format of my machine.
Thanks in advance.
*** Sent via Developersdex http://www.developersdex.com *** Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112685
sqltransaction
im updating a header and detail table with an update constraint. sqlcmd1 is
used to update header, sqlcmd2 is for detail. both cmd runs in one
sqltransaction.
my problem is my second sqlcmd catches a constraint error when updating the
detail table. is it because my record in the header table is not yet commited
and my foreignkey in the detail table requires that the primarykey already
exists in the header table?
is there a way to implement sqltransaction in header,detail table with
update constraint? how?
--
rad Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112673
Question regarding DataRowView.RowFilter
Hi There
I am having trouble with the DataRowView.RowFilter
I am giving subscribers to an asp.NET application the ability to search
through a large group of historical records based on a "Subject" field.
They have a textbox (txtSubjectCriteria) within which they enter search
criteria and then I have a radio button list that allows them to select
whether their entered criteria should be any part of a word or phrase, or a
whole word or phrase.
The any part of a word or phrase is easy and the filter string would be:
Filter = "Subject Like '%" & txtSubjectCriteria.Text & "%'"
I am, however, struggling with the whole word only option. The operators on
the DataRowView.RowFilter seem to be a bit limited ? I was expecting to be
able to use:
Filter = "Contains (Subject, '" & txtSubjectCriteria.Text & "')"
or something similar - but this does not seem to be a valid statement ?
Does anybody know how I can achieve this - I really need it to be done at
this level rather than with the original SQL statement.
Thanks for your help
Stuart Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112672
Return values from SQL compute commands
I have a vb.net program that runs summary commands on columns of a
data table. So eg I have a couple of lines of code:
MyValue= DataTable.compute(computestring, Nothing)
where eg
computestring="MAX(" & columnname & ")"
Occasionally it happens that the column is full of DBNull.Value
values. In this eventuality MyValue seems to take on an unknown type,
though it doesn't seem to raise any errors when the column datatype is
double.
My question is what type could this null value be. I've tried testing
for DBNull.Value, Not IsNumeric so that I can trap the error, but it's
neither of these. I'm not sure how to test for NaN (If MyValue is
NaN... gives a syntax error).
Any thoughts please?
JGD Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112657
System.InvalidOperationException: ExecuteReader
Hi, I have a little application coded with .net 1.1, my problem is that this
application worked fine in W2000. But the client change to XP, and from that
get this error.
This problem show when try to read from a table of Access XP.
Anybody knows why this happen now and not with W2000 ???
Thanks Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112656
DataColumn.Expression complex calculations
Hi.
Does anybody know how to perform complex calculations using the
DataColumn.Expression property?
Specifically, I'm trying to calculate the difference between a DateTime
column and the current date:
DateTime.Now.Subtract(certainDate).TotalDays
Is there a way to integrate custom functions in this property? Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112646
Trying to find ClientID of web form - Update
This works:
<form>
<asp:TextBox id="name" />
<%= name.ClientID %>
</form>
But this DOES NOT work:
<form>
<datagrid id="dg">
<asp:TextBox id="name" />
<%= name.ClientID %>
</datagrid>
</form>
and throws an error of:
Compilation Error
Compiler Error Message: BC30451: Name 'name' is not declared.
Any ida why???
TIA
...Geshel
--
**********************************************************************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
********************************************************************** Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112643
Displaying many-to-many relation data in dataGrids
Hello,
I have following problem. I have dataSet with two tables, containing data
about some people and a relation describing connections between these
people:
People:
Id
Name
Contacts:
Id
IdFriend
This is many - to - many relation, every person can have many friends and
every person can be a friend of many. I have primary key on People.Id and on
Contacts.Id, Contacts.IdFriend, and two relations:
People.Id - Contacts.Id and People.Id - Contacts.IdFriend
I want to display two dataGrids, one with list of all people, second one
with list of friends of person selected in first datagrid. Can anyone give
me some suggestion how to do that ?
Thanks,
Adam Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112641
Trying to find ClientID of web form
I need to get the ClientID of a form field for some JavaScript. About
25+ web sites I visited recommend the following method for finding the
client ID of a web form:
Web Form -> <asp:TextBox ID="datefield" type="hidden" Runat="Server" />
Client ID -> <%= datefield.ClientID() %>
Unfortunately, this only provides the following error:
Compilation Error
Compiler Error Message: BC30451: Name 'datefield' is not declared.
Source Error:
Line 200:
Line 201:
Line 202:<%= datefield.ClientID() %>
Line 203:
Line 204:
Why does this throw an error on my page? IF this is wrong, why did the
other 25+ MVP's (who recommended this method) also get it wrong?
As a hint, here are a few URL's where it gives the exact method that
fails for me:
http://www.syncfusion.com/FAQ/aspnet/WEB_c5c.aspx (#28.10, link doesn't
work)
http://www.startvbdotnet.com/aspsite/controls/default.aspx
http://www.thecodeproject.com/aspnet/resource_files_in_asp_net.asp
http://youngpup.net/2004/distro (second scrollbox)
http://www.ondotnet.com/pub/a/dotnet/2003/09/15/aspnet.html?page=last&x-order=date
And perhaps the clearest example that an author claims works, but
doesn't work with me:
http://www.janetsystems.co.uk/Default.aspx?tabid=72&itemid=137
Also, how does one make an <asp:TextBox /> invisible on the web page?
Using a Type="hidden" doesn't seem to do the trick (it is still visible).
TIA
...Geshel
--
**********************************************************************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
********************************************************************** Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112639
Trying to find ClientID of web form
I need to get the ClientID of a form field for some JavaScript. About
25+ web sites I visited recommend the following method for finding the
client ID of a web form:
Web Form -> <asp:TextBox ID="datefield" type="hidden" Runat="Server" />
Client ID -> <%= datefield.ClientID() %>
Unfortunately, this only provides the following error:
Compilation Error
Compiler Error Message: BC30451: Name 'datefield' is not declared.
Source Error:
Line 200:
Line 201:
Line 202:<%= datefield.ClientID() %>
Line 203:
Line 204:
Why does this throw an error on my page? IF this is wrong, why did the
other 25+ MVP's (who recommended this method) also get it wrong?
Also, how does one make an <asp:TextBox /> invisible on the web page?
Using a Type="hidden" doesn't seem to do the trick (it is still visible).
TIA
...Geshel
--
**********************************************************************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
********************************************************************** Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112638
C# to SQL Server 2000 datatype mappings
Hi,
Can anyone please point me to a definitive mapping of SQL Server 2000
datatypes to C# datatypes?
I'm currently using the mapping below, but I'm sure some aren't correct...
BigInt, int
Binary, object
Bit, bool
Char, string
DateTime, DateTime
Decimal, decimal
Float, float ???
Image, object
Int, int
Money, decimal
NChar, string
NText, string
NVarChar, string
Real, float ???
SmallDateTime, DateTime
SmallInt, int
SmallMoney, decimal
Text, string
Timestamp, object ???
TinyInt, byte
UniqueIdentifier, object ???
VarBinary, object ???
VarChar, string
Variant, object ???
Any assistance gratefully received.
Mark Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112633
Scroll bar in datagrid
Hello,
I am displaying one row in a datagrid, and i made its height larger than the
datagrid height because it contains long descriptions, so a vertical scroll
bar appears but with no cursor on it to let me move down the grid.
How can i have access to the datagrid scrollbar?
or what else can i do?
Thank you. Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112627
Input string was not in a correct format
I am trying to update a backend Access DB once a user make a change in the
datagrid as follows:
private void dgrdResource_CurrentCellChanged(object sender,
System.EventArgs e)
{
int curColumn = dgrdResource.CurrentCell.ColumnNumber;
int curRowIndex = dgrdResource.CurrentCell.RowNumber;
string columnName = dtResources.Columns[curColumn].ColumnName;
string newValue = dgrdResource.CurrentCell.ToString();
daResources.UpdateCommand.Parameters["newValue"].Value = newValue;
DataRow curRow = dtResources.Rows[curRowIndex];
daResources.UpdateCommand.Parameters["LastName"].Value = curRow["LastName"].ToString();
daResources.UpdateCommand.Parameters["FirstName"].Value = curRow["FirstName"].ToString();
daResources.UpdateCommand.CommandText = String.Concat( "UPDATE Forecast SET ", columnName, " = ?", " WHERE LastName = ? AND FirstName = ?");
daResources.Update( dtResources );
}
and I got the error:
Input string was not in a correct format
any suggestions? Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112626
ORA-06550 when using stored procedure
I'm getting this error message when I run the code snipped below:
{"ORA-06550: line 1, column 18:\nPLS-00306: wrong number or types of
arguments in call to 'TEST'\nORA-06550: line 1, column 7:\nPL/SQL: Statement
ignored\n" }
The stored procedure contains a function:
FUNCTION test
( pPeriod varchar2,
pNumPeriods NUMBER
) RETURN NUMBER:
Here's the C# code:
sQuery = "PRODUCTION.TEST";
cmd = cn.CreateCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = sQuery;
oPeriod = new OracleParameter("pPeriod",OracleType.VarChar,10);
oPeriod.Value = "20050531";
oNumPeriod = new OracleParameter("pNumPeriods",OracleType.Number );
oNumPeriod.Value = 5;
oRetVal = new OracleParameter("RetVal", OracleType.Number);
oRetVal.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(oPeriod);
cmd.Parameters.Add(oNumPeriod);
cmd.Parameters.Add(oRetVal);
cmd.ExecuteScalar();
I know it's the pNumPeriods that's causing the problem because if I change
it to varchar2 in the function and VarChar in the C# code it works. I've
tried every OracleType that even remotely looks like a numeric type. Any
suggestions?
Thanks
John Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112625
Timeout Expired - SqlException when calling a Stored Procedure
Hi,
I'm getting a very weird error when I call a stored procedure with
ExecuteNonQuery.
The command, after only 9 seconds, throws an SqlException - "Timeout
expired. The timeout period elapsed prior to completion of the operation or
the server is not responding". I'm not setting the property CommandTimeout.
Cristiano Franco Tag: REQ: Practice code/files for Microsoft ADO.Net Step By Step - Please Tag: 112620
Hi all,
Can someone please email me the code for this book .. Microsoft ADO.Net Step By Step 2002