Get Column Name from a DataSet
Hello,
I was wondering if anyone knows how to get a column name from a dataset
where the column name contains nulls. I am able to get a columns name using
getxml() however columns that have null's do not return the name of the
column in the xml.
Basically I want the dataset to return columns names even if the column
names contain null values.
thanks guys. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90172
excel question
i have oledb connection with this string
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Downloads\sase2.xls;Extended Properties="Excel
8.0;HDR=Yes;IMEX=1"" and work fine with normal *.xls file but when file is
saved as web page i get error initializing connection. What i need to do to
read that excel document?
thx Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90171
duplicating a DataRow
Hi All,
I've got a strongly typed DataSet where I want to: traverse the rows in a
table and do a check. If the check is successful, I want to duplicate the
row, tweak a column, then add it to the same table in the DataSet.
What's the most efficient way to do this?
I tried to 'new' a new DataSet-derived DataRow (and hoping to copy a row
into it), but the constructor wanted a DataRowBuilder, which i don't have.
DataRowBuilder appears to be an internal object, not useable by us
developers.
Also, the table has 34 columns and it's a pain in the rear to write all the
code to deal with the DataRow indexes. Is there a better (less typing) way
to do the copy, or do I have to deal with the base DataSet class
exclusively?
Thanks in advance!
Corey. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90167
Problems with connection pooling on Oracle (ORA-03114)
We are having issues with some of our applications that utilize=
connection pooling via the OracleConnection Class
Of the System=2EData=2EOracleClient Namespace=2E At this time we are=
unable to determine of the problem lies within our code that=
connects to our DB and then executes the necessary stored=
procecures, the parameters we define in the ConnectionString=
property, or the Oracle DB itself=2E What we do know, however is=
that when we enable connection pooling, over time our=
application is no longer able to connect to our DB and we=
receive =2ENET errors like the one I?ve pasted below=2E Then, when=
we recycle the application pool that this application is running=
in, we are able to connect to the DB again and our application=
works=2E Then, like I said over time, it will fail again, with the=
same or similar message=2E I?m also wondering if our code is not=
handling the connection to the DB properly=2E Perhaps we are not=
closing connections when an exception is thrown, or we are just=
not handling errors returned from the DB gracefully=2E
*****************************************************************=
****
Application KSLearn FailedSystem=2EWeb=2EHttpUnhandledException:=
Exception of type System=2EWeb=2EHttpUnhandledException was thrown=2E=
---> System=2EData=2EOracleClient=2EOracleException: ORA-03114: not=
connected to ORACLE
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>PqWnZqQwA0WZPDSxYXDN7w=3D=3D</Id> Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90165
Create dataadapter programically or drog &drop ?
my tables are very big size.
If i drag&drop the table as adapter, it seems fill in all the data in
dataset during formload.
Which is the best way ? programmically to create or use drag or drop ? Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90162
DataRowView.Row == Null???
Hi all,
I have noticed some weird behavior of the DataView. When I call
DataView[i].Delete() on a DataView it appears that the row is deleted. But
sometimes the DataRowView lives on, but the underlying DataRow is null.
Also, I handled the DataRowChanged event and inside of there I do a
GetChildRows() on that same table, but along with all the valid rows, a null
value is returned. It's as if the underlying DataTable still thinks the row
is there even though it is not.
I am changing the DataView.RowFilter inside of the RowChanged/RowDeleted
events. I think this is what is causing the problems. I change the filter
on the child view when the parent view updates its primary key and it
appears that this is what is causing the funky behavior. That's my best
guess. I have got around the problem by updating all my rows first and then
going through and doing the deletes separately.
Has anyone else experienced anything like this??
Cole Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90160
lock records for update: how? options?
Hi,
I know ADO.Net recommand using disconnected update
(optimistic concurrency) for good reasons, but it's just
not an option for us. 99% of our client would rather
seeing "record locked" kind of message up front when they
load records, than being told "updating failed" after they
spend all the time entering the data.
So here I am spending a lot of time trying to find a good
way to do the "read with lock" type of opration. I know
you can do some thing like that, at the query level, if
you are running some late version of SQL server, but what
if I can't use those DB specific features? Is there a
recommanded way of doing this at ADO.Net level"? What
about ADO.Net's transaction?
If someone can point me to a right direction that would be
highly appreciated!
Thanks
Feng Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90159
SOS! ORA-03114: not connected to ORACLE && MS's Bug??
ORA-03114: not connected to ORACLE && MS's Bug??
DataBase:Oracle 817
using OracleClient,net framework 1.1
I'm using ADO.Net in C# with Oracle 817.
and following is my public data access class.
using System.Data.OracleClient;
public class ComFun
{
static public IDataReader ComFun_ExeReader(string Sql)
{
OracleConnection Conn=new
OracleConnection(ConfigurationSettings.AppSettings["OracleConnectionString"]
);
OracleCommand Cmd=new OracleCommand();
Cmd.CommandText=Sql;
Cmd.Connection=Conn;
Conn.Open();
OracleDataReader
Reader=Cmd.ExecuteReader(CommandBehavior.CloseConnection);
return Reader;
}
static public DataSet ComFun_ExeDataset(string Sql)
{
OracleConnection Conn=new
OracleConnection(ConfigurationSettings.AppSettings["OracleConnectionString"]
);
OracleDataAdapter Ad=new OracleDataAdapter(Sql,Conn);
DataSet ds=new DataSet();
Conn.Open();
Ad.Fill(ds);
Conn.Close();
return ds;
}
static public Object ComFun_ExeScalar(string Sql)
{
OracleConnection Conn=new
OracleConnection(ConfigurationSettings.AppSettings["OracleConnectionString"]
);
OracleCommand Cmd=new OracleCommand();
Cmd.CommandText=Sql;
Cmd.Connection=Conn;
Conn.Open();
Object Obj=Cmd.ExecuteScalar();
Conn.Close();
return Obj;
}
}
in other .cs files i always coding like this
string sql="select person_name,person_age from person";
IDataReader Reader=ComFun.ComFun_ExeReader(sql);
DropList.DataSource=Reader;
DropList.DataText.....="person_name";
DropList.DataBind();
Reader.Close();Reader.Dispose();
but sometimes returning the following exception "ORA-03114: not connected to
ORACLE". sometimes not.
Why?????
I find a article
http://www.dotnet247.com/247reference/msgs/49/248580.aspx
And find this one !!!!!!!!!!!!!!
"
Michael Bachar
Hi,
I'm using ADO.Net in C# with Oracle9i Release 9.2.0.4.0
when loosing the connection with the Oracle database server the connections
doesn't recover and always returning the following exception even when the
connection has been restore:
"ORA-03114: not connected to ORACLE". I'm closing the connection properly in
that it will return to the connection pool. Here is an example code:
using(OracleConnection conn = new OracleConnection(connectionString))
{
conn.Open();
using(OracleCommand cmd = new OracleCommand(sql, conn))
{
object obj = cmd.ExecuteScalar();
}
}
This should close the connection properly. In the MSDN it is mention that if
the connection pooler detect that the connection with the server has been
severed it will remove the connection from the connection pool. It appears
that this is not happening an I always get bad connections from the pool,
even after the connection with the database server has been restore. How can
I solve this? What is the proper way to recover from connection lost with
database server?
Thanks,
Michael.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Angel Saenz-Badillos[MS] (VIP)!!!!!!!!!!!
Michael,
I am sorry this one is my fault and it is a very bad
bug.!!!!!!!!!!!!!!!!!!!! The problem here
is that our pooler fails to understand that a 03114 exception means we
should not put the connection back in the pool. We have a QFE that fixes
this problem by discarding the connection in the following Oracle
exceptions. Please let me know if you know of any other exceptions that also
result in a connection no longer being valid.
oracle exceptions checked
case 18: // max sessions exceeded,
case 19: // max session licenses exceeded
case 24: // server is in single process mode
case 28: // session has been killed
case 436: // oracle isn't licensed
case 1012 //not logged on error
case 1033: // startup/shutdown in progress
case 1034: // oracle not available
case 1075: // currently logged on
case 3113: // end-of-file on communication channel
case 3114: // not connected to ORACLE
case 12154: // can't resolve service name
case 12xxx //any error starting with 12 thousand
To get the fix please contact PSS directly and request QFE 830173
"
???? Does It's MS's BUG?
And What should I Do? Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90158
Speed of inserting data in table SqlServerCE
I have written some proof of concept code that adds records to a table,
utilizing SqlServerCe, using a parameters in a insert statement.
I am forced to read data from a BinaryStream (in the form of a file), assign
values to the parameters and execute the sql insert statement from within a
while loop
The table contains 11 fields, and it currently takes over two minutes to
read 4500 records...
This is maddness, as I am porting from an old application, and I can
accomplish the above in about 2 seconds using my old code (written in OPL)
using a device thats 4x slower than the one I'm currently developing on.
Anybody have an idea how to speed this up? or mybe a sneaky workaround... :)
Regards BM Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90156
Data Form Wizard Question.
Hello,
Is there a way to make the data form wizard create windows forms using
sqlConnection, sqlDataAdapter and sqlCommand instead of OleDBConnection,
OleDbDataAdapter since all my projects deal with SQL 2k server? Thank you in
advance. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90154
SqlDbType not Found using VB.NET (compact framework)
I am trying to populate a table in a table in a database I have created
using parameters. The following line doesn't work.
cmd.Parameters.Add(New SqlCeParameter("CUniq", SqlDbType.Shortint))
due to the fact that SqlDbType is not found. (not declared)
I have the following imports.
Imports System.IO
Imports System.Data.SqlServerCe
Imports System.Data.Common
Imports System.Data
The documentation says that SqlDbType enumeration is a member of the
System.Data namespace, but I can't find in the tab completion.
Please, any explanation or commentary is very appreciated...
Regards,
BM Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90153
load tables with constraints
Hi
How to lad tables from
database to dataset with constraints.
Thanks
Konrad Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90152
relationship
Hi
How to create relation in
SQL Server Database programatically?
Thanks
Konrad Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90146
Using a datagrid to display info from database
Is it possible to be able to select a single row in a datagrid and use
that selection to open a new form that contains all of the data in
the row? I'm working on a home inventory program in VC++ with a
database backend and I'd like to be able to standardize the forms
used. But I can't get around an effective means to edit a selected
data item. Any ideas?
Thanks!
Alex
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90141
Getting information messages back in real-time
Hello,
It's possible to create messages in SQL Server 2000 that get sent to
the client immediately, by using RAISERROR ... WITH NOWAIT. For
example, the following code works great in Query Analyzer:
RAISERROR(N'Message 1', 0, 1) WITH NOWAIT
WAITFOR DELAY '00:00:02'
RAISERROR(N'Message 2', 2, 1) WITH NOWAIT
WAITFOR DELAY '00:00:02
RAISERROR(N'Message 3', 4, 1) WITH NOWAIT
WAITFOR DELAY '00:00:02'
However, I find that when I try to execute a script or procedure from
ADO.NET, and try to receive these messages using the InfoMessage
delegate, I don't get them until the very end, all in one chunk. I'm
writing a long-running procedure, and I'd like the client to be able
to receive status messages to print to the console. Is there any way
to get messages to get sent to the client in real-time?
Thanks,
Brian
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90136
Multiple XML nodes with the same tag + DataRow access?
hello,
I have the following xml structure which I load into a DataRow (the xml
document is loaded into a dataset...)
<EXMAPLE_NODE>
<A>string1</A>
<B>string2</B>
<C>string3</C>
<D>string4_1</D>
<D>string4_2</D>
<D>string4_3</D>
</EXMAPLE_NODE>
I know I can Access nodes A,B &C using indexed access. How can I access
the D nodes (I don't want unique names for them)?
Is there anyway to access these via a foreach iteration?
Thank you in advance,
Jamie Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90134
DataSet filtering
Hi,
If I retreive a set of records from my database e.g.
NAME GROUP
John Beetles
John Sting
John Queen
Bob Brittany
and I have in a dataset. If I want to display in a list
Bob
John
is there an easy way to do a operation such as SELECT DISTINCT NAME FROM DATASET
so that I can filter it without doing another database call?
thanks
Tim Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90131
excel question
i have oledb connection with this string
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Downloads\sase2.xls;Extended Properties="Excel
8.0;HDR=Yes;IMEX=1"" and work fine with normal *.xls file but when file is
saved as web page i get error initializing connection. What i need to do to
read that excel document?
thx Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90128
Using the FillSchema
I have a question about the Fillschema method. According the documentation the schema is built base on the contents of the SelectCommand. I using stored procedure to load tables in the dataset. I also use the fillschema to load the schema into my datatable. I'm not sure if things are working as I think they should. How would I get a schema loaded if I'm not using the Select query in the selectcommand? I'm using stored procedures instead. I have sample code below:
Sub CheckForAlertData(ByVal MinDevice As String)
Dim AlertDBConnection As SqlConnection = New SqlConnection(AlertVar.AlertConnectionString)
Dim AlertHist_ID As Integer
Dim AlertVehiclServiceID As Integer
Dim AlertOdometerID As Integer
Dim AlertReading As Integer
Dim ServiceID As Integer
Dim AlertThreadConnection As SqlConnection = New SqlConnection(AlertVar.AlertConnectionString)
'Read Min_GPS_History to get Min Device detail
Dim AlertThreadDataCMD As SqlCommand = New SqlCommand("SelectMinGPSHistoryByMin", AlertThreadConnection)
AlertThreadDataCMD.CommandType = CommandType.StoredProcedure
Dim AlertThreadParm As SqlParameter = AlertThreadDataCMD.Parameters.Add("@MinDevice", SqlDbType.VarChar, 10)
AlertThreadParm.Direction = ParameterDirection.Input
AlertThreadParm.Value = MinDevice
AlertThreadDataCMD.Parameters.Add(AlertThreadParm)
Dim AlertDA As SqlDataAdapter = New SqlDataAdapter(AlertThreadDataCMD)
AlertThreadConnection.Open()
AlertDA.FillSchema(AlertDS, SchemaType.Source, "MinGPSHistory")
AlertDA.Fill(AlertDS, "MinGSPHistory")
AlertDBConnection.Close()
End Sub
Thanks Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90126
Getting data from a dataset one field at a time
I have create a dataset that contains only the data that I want. Now I want to display the data a field at a time. How do I retreive the data in order to display it? I have included a code sample below:
Private Sub GetDataByEventType(ByVal AlertType)
Dim AlertTypeData As DataTable = AlertDS.Tables("AlertDetail")
' Check for Alert Type of Speeding as an EventType.
Dim AlertExpression As String
' Dim EventType as String =
'Dim TypeOFAlert As String = AlertType
AlertExpression = "EventType = 'Speeding' and Speed > EventDataLow"
Dim AlertsFound() As DataRow
' Use the Select method to find all rows matching the filter.
AlertsFound = AlertTypeData.Select(AlertExpression)
Dim Alert As Integer
' Send Message to Screen of each returned row.
For Alert = 0 To AlertsFound.GetUpperBound(0)
Console.WriteLine(AlertsFound(Alert)(0))
' MsgBox("Min Number: " & Min_Num & "is Speeding" & "Speed is: " & Speed)
Next Alert
End Sub Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90119
.NET and SQL Server on Separate Machines
Hi all,
We're working on an ASP.Net Web Application that makes several calls to a
SQL Server database. Everything was running correctly when the database
and the web server were on the same computer, but we have sinced moved
them to separate computers; IIS V6 on Win2000 and SQL Server 8(SP3) on Win
Serv 2003 Ent.
The connection string in our web.config file originally looked like this:
<add key="ConnectionString"
value="server=localhost;Trusted_Connection=true;database=Store;" />
After moving the database (and changing the server in the connection
string), we started to receive this error: "Login failed for user
'(null)'. Reason: Not associated with a trusted SQL Server connection."
We ended up changing the connection string to look like this:
<add key="ConnectionString" value="Integrated Security=SSPI;Initial
Catalog=Store;Data Source=192.168.0.12;" />
This string only works if we add the following to the .config file:
<authentication mode="Windows" />
<identity impersonate="true" />
Unfortunately, the web application was designed to use forms
authentication, so we're still looking for a valid connection string.
We've tried setting Trusted_Connection=false and providing a username and
password, but we get the same error as before - only with the provided
username listed instead of (null). We've tried setting the database to
mixed mode, and Win Auth only and got the same results.
Any help would be greatly appreciated.
--
Jason DeCock
Elk River Systems, Inc.
http://www.elkriversystems.com Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90118
VB.NET PROJECT to C# Project conversion
Hi,
DO we have any tool which will help us to convert the web project from the
VB.NET to C# language?
Thanks,
Vijay Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90112
KeyInfo using Data Access Application Block for .NET
Is there a way to retrieve the KeyInfo using the Microsoft Data Access
Application Block for .NET?
I want to use either a DataSet or SqlDataReader object to grap the primary
key information from the columns. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90104
405 error on put
I am trying to upload a pdf file to a web server. The server is local
right now for testing.
I am running xp, iis5
I get a 405 error on the post, please help.
String uriString = "http://localhost/PineNet/";
WebClient myWebClient = new WebClient();
string fileName = txtFilename.Text;
byte[] responseArray =
myWebClient.UploadFile(uriString,"POST",fileName);
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90101
Viewstate works on test server but not production server
Please help! I am tearing out my eyes trying to figure this out. I have a test server IIS 5.0 and a production server IIS 6.0. The test server holds the viewstate of a 3 dropdowns with a problem. However, the production server only holds the viewstate of 2 of the dropdowns. Why would it work on one server and not the other? Why would it work for 2 of the controls but not all 3? THANK YOU IN ADVNACE FOR THE HELP.
I am using ASP.NET with VB (no code behind). Here is a snippet of the code. DropList_OS is the problematic dropdown.
<asp:DropDownList id="dropList_Dates" runat="server" dataTextFormatString="{0:d}" CssClass="Headings" AutoPostBack="True">
<asp:ListItem Value="{0}" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList id="dropList_Regions" runat="server" CssClass="Headings" AutoPostBack="True">
<asp:ListItem Value="{0}" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList id="dropList_OS" runat="server" CssClass="Headings" AutoPostBack="True"></asp:DropDownList> Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90094
Annotations in Strongly typed datasets with webservices
hi,
I am using annotiations in my xsd schema. the dataset is generated correctly on my webservice, but when i add a webreference to the webservice from another webservice, the dowloaded xsd schema from my webservice doesn't contain the annotiated names, my codegen namespace is filtered out of the xsd schema.
Has anyone an idea to resolve this Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90091
Add sorting to SQLDataAdapter at runtime. How?
I have a SQLDataAdapter that I have configured. Since I want to tie this to
a DataGrid and add sorting to the datagrid, I do not want to configure the
adapter with sorting. I want to be able to add the sorting at runtime
depending on the column that the user clicked on the datagrid. I am probably
missing something very simple here. Below is the code that I am using to
fill my datagrid.
Thanks in advance!
sqlMfgNumber.SelectCommand.Parameters(0).Value = "%" &
txtSearchFor.Text.Trim & "%"
sqlMfgNumber.SelectCommand.Parameters(1).Value = strOmittedNumber
sqlMfgNumber.Fill(DsMfgNumberSearch1)
If DsMfgNumberSearch1.Tables(0).Rows.Count > 0 Then
lblError.Visible = False
Datagrid1.DataSource = DsMfgNumberSearch1
Datagrid1.DataBind()
Else
lblError.Visible = True
End If Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90090
Persistance UPDATE problem - revised Q for clarity
I'd like to clear up a very long-standing problem I have had only because I have done a little more testing, but the problem is still there.
On Page_Load event, the textfields on my page fills with the personal data stored in a SQL DB, as follows:
Dim cn As SqlConnection
Dim cmd As SqlCommand
Dim rdr As SqlDataReader
cn = New SqlConnection("xxx")
cn.Open()
cmd = New SqlCommand("SELECT SName FROM ClientDetails WHERE clientRef=100", cn)
rdr = cmd.ExecuteReader()
rdr.Read()
'fill the surname textbox
txtSName.Text = rdr("ColSurName")
cn.Close()
e.g. pretend the value of the colSurNamel in the DB is 'Smith'
Then on the form my clients can update their details by simply overwriting the text in the textboxes and hitting the UPDATE button.
Assume I have now updated the textbox with 'Bloggs' and I've hit the UPDATE button (code as follows):
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conCOMP As SqlConnection
Dim cmdUPDATECOMP As SqlCommand
conCOMP = New SqlConnection("xxxxxx")
strCOMP = "UPDATE ClientDetails SET colSurName= '" & txtSName.Text & "' WHERE ClientRef = 100"
cmdUPDATECOMP = New SqlCommand(strCOMP, conCOMP)
Label4.Text = strCOMP
conCOMP.Open()
cmdUPDATECOMP.ExecuteNonQuery()
conCOMP.Close()
End Sub
I've added a label here to view the value of the UPDATE command when it is passed BUT it gives the value already stored in the DB / or rather the value it already got in the Page_Load routine:
the text in Label4 is: " UPDATE ClientDetails SET colSurName = 'Smith' WHERE ClientRef = 100 "
I think it is obviously the text box variable: having got a value for when the Page_Load event occurs. But how can my clients change the text boxes to update their details and hit UPDATE??????
PLEASE PLEASE HELP. This seriously has been BUGGing me for a month. My Client is not happy :( Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90089
Stupid XML Serialisaton and Web Services
My company's XML webservice has several methods that pass back=
serialised data, and all seemed well during testing, and during=
the first few weeks of deployment=2E But people are coming back to=
me saying that the keep getting the error "DataRelation cannot=
be serialized because it does not have a default public=
constructor" when they browse to the URL of the Web Service=2E But=
it does have a public constructor, it really does, and now it's=
driving me up the wall=2E
Thanks
--------------------------------
Matthew Carter
Development Manager
Applied Language
http://www=2Eappliedlanguage=2Ecom
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>eDIiibqwKEyiHx8pwjI4lA=3D=3D</Id> Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90084
Stupid XML Serialisaton and Web Services
My company's XML webservice has several methods that pass back=
serialised data, and all seemed well during testing, and during=
the first few weeks of deployment=2E But people are coming back to=
me saying that the keep getting the error "DataRelation cannot=
be serialized because it does not have a default public=
constructor" when they browse to the URL of the Web Service=2E But=
it does have a public constructor, it really does, and now it's=
driving me up the wall=2E
Thanks
--------------------------------
Matthew Carter
Development Manager
Applied Language
http://www=2Eappliedlanguage=2Ecom
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>CYL2gyk18kiRmISG88IWbw=3D=3D</Id> Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90083
Autoincrementing Primary Keys with PostGres
I am using an ODBC connection to a PostGres database, that has various tables that use SERIAL types to implement automatically incrementing primary keys.
My problem is that I have a dataset containing tables that I have turned AutoIncrement on, and set the seed and step to -1. My update statement works a treat, and any new rows are added sequentially to the end of the table. However, I need a way of immediately returning a new rows primary key, in order to keep the dataset up to date.
I know that in SQL Server you can use the @@IDENTITY feature, to immediately return the last used value. Is there something similar in PostGres?
I have tried adding a 'SELECT CURRVAR('public.equipmenttype_equipmenttypeid_seq') just after my insert statement (which is the SQL that you use to find out the current sequence id in PostGres), but I am not sure of the ODBC syntax needed to get this information into a parameter (I assume I would need to use a ParameterDirection.ReturnValue).
This problem has been vexing me for a few days now. Any ideas or a better way of handling autoincrementing keys would be gladly received. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90076
DataTable column question
Hi!
It's easy to add Columns into DataSet DataTable for example like this way
...
ds.Tables("MyTable").Columns.Add("MyColumn", GetType(Integer))
... but how can I remove this column of the DataSet which was created
earlier by code? Do I have to create whole new DataSet table again?
I mean something like ds.Tables("MyTable").Columns.Remove("MyColumn") -
ofcource it's not possible to do like this way :)
I tried ... ds.Tables("MyTable").Columns("MyColumn").Dispose() ... but it
doesn't seem to do what I want.
--
Thanks in advance!
Mika Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90065
Persistent UPDATE Problem
Hi there
I have had an application where I have not been able to successully add an 'update details page' for my clients logged in to the website.
I have posted a query on this before and the result was that the WHERE clause was probably wrong; without success....but I have added a test labels to test so now know a little more so hopefully you can help.
Have ASP.NET / SQL Server 2000. The web app has a members area which is https. i'm using authenication ticket which stores the member ID ref as a state variable called 'MemberRef'
So problem page....
When this UPDATE PERSONAL DETAILS page loads, it fills the textboxes on the page with a datareader according to who is logged in. One textbox example is as follows:
txtFirstName.Text = rdr("colFName")
Then of course I need a process so my members can update their personal details stored in the DB, so those text boxes allow updates and I've added a button which should update the DB
Private Sub ButUpdatePractice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 'Handles ButUpdatePractice.Click
Dim strCOMP As String
Dim conCOMP As SqlConnection
Dim cmdUPDATECOMP As SqlCommand
conCOMP = xxx
cmdUPDATECOMP = New SqlCommand(strCOMP, conCOMP)
strCOMP = "UPDATE ClientDetails SET colFName = @Fname WHERE MemberRef = @MemberRef"
cmdUPDATE.Parameters.Add("@Fname", txtFirstName.Text)
cmdUPDATE.Parameters.Add("@@MemberRef", MemberRef)
conCOMP.Open()
cmdUPDATECOMP.ExecuteNonQuery()
conCOMP.close
-now plrease ignore any misspellings above - done it for speed for this forum.
Now this doesn't update the DB when pressing the update button. It re-freshes the page. I've added a label to the page which shows the strCOMP update string on the page to test ( label1.text = strCOMP ) and it contains the existing value from the DB.
Please help. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90062
Dataset constraint violoation with null foreign key value
Hi,
I'm loading a dataset from a cached viewstate version of the dataset created
on a previous http request. When I read the call ReadXml on the typed
dataset, I get:
"Failed to enable constraints. One or more rows contain values violating
non-null, unique, or foreign-key constraints"
I suspect this is due to a field in one of the tables which can be null, but
if it is not null it is a foreign key to another dataset table. At present
the field in this table is null (in the database).
What attributes of the dataset table field, or the dataset constraint should
I set to indicate null values don't violate the constraint?
Thanks
Martin Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90061
Datagrid hide identical columns from a JOIN
I do not normally use JOINS in my queries these days, but I have some
instances where I am simply showing historical data in a grid, and it is
thus much more convenient to JOIN everything I need in one stored procedure.
Thus I might end up with data from 3, 4 or more tables -- some with
identical names (the JOIN criteria).
I know how to hide columns in a straightforward query, but how about in a
JOIN query where you may have 2 or even 3 or more identical field names (IDs
usually)? How do you hide, for example, the SalesID from the 2nd table or
the from the 3rd table? For example, the following statement works for the
first SalesID, but what about the other JOINED SalesID fields? (I've tried
"SalesID1" and "Expr1", but no joy except SalesID1 seems to work on a simple
query with 2 joined tables).
ds.Tables("dtSalesPayments").Columns("SalesID").ColumnMapping =
MappingType.Hidden Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90057
.NET SQL Client: Connection pooling issue
Hi All
Follow up to my last week' postings on connection pooling issue we
experience. Thanks all for your replies but since I still don't have a
solution ? I've decided to start a new thread. Here is a link to the
original thread: http://tinyurl.com/yu68q
We use SQL Client (SqlCommand, SqlConnection and SqlDataReader) in our
3-tiered ASP.NET app written in C#. The problem we are running into is
that under heavy load the number of pooled connections increases
approximately by the current pool size every time the garbage
collector kicks in.
This happens even when only about 60 connections exists in the pool
with the max size of 100. The number of pooled connections does not
grow until the GC engages and ? the most puzzling ? the new connection
pool is being created at that very moment.
I rely on .NET CLR Data performance counters which I suspect might not
be reliable. But if they aren't ? what is? The documented MS Knowledge
base issue with the counters
http://support.microsoft.com/default.aspx?scid=kb;en-us;314429 doesn't
seem to apply here)
I also follow all the good coding practices such as closing the
connection and DataReader in the finally block. I do not have any
destructors or Finalize implementations in the app as well. I have
performance monitor screenshots for all interested.
Any ideas?
Thank you! Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90054
HLP: Adding Column Info to ListView
What I'm trying to do is to Add the information of Two Tables into a single
ListView. The ListView has 10 columns.
The following Code populates the LV columns 1 to 5 (or rather 0 to 4) from a
DataSet...
Private Sub MstrEmPay()
Dim dtDataTbl As DataTable = DsMstrEmPay.MASTER_PRM_EMPLOYEE_PAY
' Get Info from Data Base
For cntr = 0 To DsMstrEmPay.MASTER_PRM_EMPLOYEE_PAY.Rows.Count - 1
Dim dr As DataRow = dtDataTbl.Rows(cntr)
Dim LItem As New ListViewItem
Dim rowTtl As Double = 0
LItem = New ListViewItem
LItem.Text = dr("amount")
LItem.SubItems.Add(dr("employee"))
LItem.SubItems.Add(dr("pay_id"))
LItem.SubItems.Add(dr("pay_type"))
lvProjDisplay.Items.Add(LItem)
Next ' cntr
End Sub
What I want to do is to get the info of another DataSet and dump it's info
into the next 5 remaining Columns (starting at the first row of the
ListView).
I've done some reading and I 'think' I need something like:
LItem.SubItems.Insert(5, myTextHere)... but haven't found how to make this
work.
Anyone can help?
Regards,
Bruce Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90053
SQL Server JOBS
Hi!.
I am developing a windows application where i need to give users alerts about their pending jobs once they login into the application. I am trying to create SQL Server jobs to give those alerts( If anyone has any other option kindly post the same). now can anyone tell me how do i populate the alert on the user machine.
Thanks in advance
Baren Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90048
Het zal toch niet zijn wie ik denk dat het is?
Is het die Ear Youth weer? Nee, het is Arjen Jongeling!
Het is een kwestie van geduld
voor heel usenet Hollands lult Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90044
Making an app run on a local area network.
I realize I have asked this question before and the answer is slowly
becoming clearer but I do not yet quite have it in place. I have a VB.net
application that I have written from a client machine of a local area
network. The LAN has a dedicated file server. The solution is located in a
shared directory of the LAN's file server The drive letter is F. The
application is bound to a SQL Server 2000 database that also resides in a
shared directory on the F drive of the file server.
My application works on the machine I am using but then I have a full blow
copy of VS 2003 installed on the machine. I would like to be able to run
the application from other machines on the local area network. These other
machines all have Windows XP Pro installed and the .net framework.
What do I need to do in order for this to happen? If I understand correctly
I do not have to even worry about creating a .MSI file; I can simply point
the other machines to the .exe file that is created in the Bin directory of
the application that, again, is located in a shared directory of the server.
Is this right? What else do I need to do in order to make (allow) this
application to run from other machines on the Local Area Network? Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90042
Cannot change row in RowUpdating event
Hi,
I had expected to be able to change the DataRow that is passed into the RowUpdating event, but for some reason it does not seem to work. Am I doing something wrong or is a workaround?
--
Thanks in advance,
Juan Dent, M.Sc. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90041
detaching an XmlDataDoc from a DataSet
Hi All,
I've got an XmlDataDocument that is attached to a DataSet with one DataTable
in it. Then I take the XML as text and throw it into a Text Box on a form.
Later on, I wanted to add another DataTable to the DataSet and it
complained:
Cannot add or remove tables from the DataSet once the DataSet is mapped to a
loaded XML document.
How do/can I detach the XMLDataDoc from the DataSet?
Thanks!
Corey. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90040
ADO Shape command to return XML
I'd like to be able to utilize the ADO Shape syntax to return XML.
I've seen examples in MSDN that returns an OLEDB DataReader of this hierarchical data..however I'd like the XML out of it.
I've done this in the previous version of ADO, but I haven't figured out how to do this in ADO.NET. Any insight would be appreciated.
Many thanks-
Dan Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90033
How to create data adapter for multiple tables (joint tables)?
I use sql builder to create a dataadapter. If there is only one table, the
insert/update/delete commands are automatically created successful. However,
if I build a select command based on multiple tables, I got errors:
"insert/update/delete commands can't create automatically for multiple
tables...?". Any of you know how to accomplish this?
Any suggestions are greatly appreciated.
-V Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90023
Query Analyzer speed vs. SqlCommand.ExecuteReader speed
All,
I have an SP that takes about 5 seconds to run before any caching performed by SQL server (I run DBCC DROPCLEANBUFFERS to make sure in my tests).
When I hook the SP into a SqlCommand object, the SP Cmd.ExecuteReader line takes about 5 seconds every time I reload the page. But if I run it through Query Analyzer it takes 5 seconds for the first run and every subsequent request is less than half a second. I assume this is behavior of Sql Server caching the tables/results.
My question is why would Cmd.ExecuteReader take 5 seconds each time if Sql Server is indeed caching teh tables/results (as evidenced by the fast subsequent QA calls)? It is possible there is SET environment variable being called by SqlCommand, or a lack of variable in the connection string that causes the ExecuteReader to take so long each time?
Thanks,
JL Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90022
global connection or seperate connections for each stored proc cal
Hi I seem to recall reading that it can be a bit risky using just 1 global data connection in the global.aspx file, instead of multiple connections, but can not recall why. Also is there a lot of overhead with multiple connections? I did a search but did not find anything. Thanks.
--
Paul G
Software engineer. Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90017
sqladapter question
I create the sqladapter programmically.
Dim daInvoice As new sqladapter ("select * from invoice",conMaster)
daInvoice.fill(dsInvoice)
bmInvoice = Me.Bindingcontext(....etc)
Me.txtInvoiceNo.DataBindings.Add("text", dsInvoice,"invoice.invno")
Now, in my add click event. (bmInvoice.addnew())
in my save event.
daInvoice.update(dsInvoice,"Invoice") <-- I got an error here, it said I
need to declare the updatecommand first.
dsInvoice.update()
my invoice got over 50 fields name , DO I need to create 50 parameters in
the commandtext ???
anyshort to update this tables ??
Thanks
From Agnes Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90012
Informix .net provider - Sql server .net provider
Hello everybody
We are currently writting a small app that will be delivered on an Informix
DB and a Sql Server DB. We will be doing some performance check pretty soon
for both databases.
Is anybody using something else other than the IBM informix provider, and
the regular SqlServer provider coming with the .net framework ?
And if so, anybody happy with the ones they chose ?
Regards Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90011
How to know total records selected?
Hello Group,
How can i obtain the total no of records selected with the help of
Datareader class. rowsaffected does not seem to work.
Thanks
Anand Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 90009
System.InvalidCastException
Hi !
First of all, I apologize for my poor english...
I've a cast problem with the code you can find below.
I really don't understand why ?
I'm trying to make a very simple WindowsForm application wich works with the
customers table of the northwind database.
You can find the database hear :
http://www.microsoft.com/downloads/details.aspx?FamilyID=C6661372-8DBE-422B-8676-C632D66C529C&displaylang=EN
There is no problem if you remove this line of code :
Me._dg.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle()
{Me._ts})
I just want to populate my DataGrid with the CustomerID (and later the
CompanyName) and using styles seems to be a good way to do this ?
Can every one help me to find what's the problem with my code...?
Any help would be appreciated.
Hervé
**** code ****
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Namespace DefaultNamespace
Public Class MainForm
Inherits System.Windows.Forms.Form
Private _cnx As System.Data.OleDb.OleDbConnection
Private _tbcID As System.Windows.Forms.DataGridTextBoxColumn
Private _ds As System.Data.DataSet
Private _cmdSelect As System.Data.OleDb.OleDbCommand
Private _ts As System.Windows.Forms.DataGridTableStyle
Private _dg As System.Windows.Forms.DataGrid
Private _da As System.Data.OleDb.OleDbDataAdapter
Public Shared Sub Main
Dim fMainForm As New MainForm
fMainForm.ShowDialog()
End Sub
Public Sub New()
MyBase.New
'
' The Me.InitializeComponent call is required for Windows Forms designer
support.
'
Me.InitializeComponent
'
' TODO : Add constructor code after InitializeComponents
'
Me._da.Fill(Me._ds, "Customers" )
End Sub
#Region " Windows Forms Designer generated code "
' This method is required for Windows Forms designer support.
' Do not change the method contents inside the source code editor. The
Forms designer might
' not be able to load this method if it was changed manually.
Private Sub InitializeComponent()
Me._da = New System.Data.OleDb.OleDbDataAdapter
Me._dg = New System.Windows.Forms.DataGrid
Me._ts = New System.Windows.Forms.DataGridTableStyle
Me._cmdSelect = New System.Data.OleDb.OleDbCommand
Me._ds = New System.Data.DataSet
Me._tbcID = New System.Windows.Forms.DataGridTextBoxColumn
Me._cnx = New System.Data.OleDb.OleDbConnection
CType(Me._dg,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me._ds,System.ComponentModel.ISupportInitialize).BeginInit
Me.SuspendLayout
'
'_da
'
Me._da.SelectCommand = Me._cmdSelect
'
'_dg
'
Me._dg.CaptionVisible = false
Me._dg.DataMember = ""
Me._dg.DataSource = Me._ds
Me._dg.Dock = System.Windows.Forms.DockStyle.Left
Me._dg.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me._dg.Location = New System.Drawing.Point(0, 0)
Me._dg.Name = "_dg"
Me._dg.ReadOnly = true
Me._dg.Size = New System.Drawing.Size(204, 418)
Me._dg.TabIndex = 0
Me._dg.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle()
{Me._ts})
'
'_ts
'
Me._ts.DataGrid = Me._dg
Me._ts.GridColumnStyles.AddRange(New
System.Windows.Forms.DataGridColumnStyle() {Me._tbcID})
Me._ts.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me._ts.MappingName = "Customers"
Me._ts.ReadOnly = true
'
'_cmdSelect
'
Me._cmdSelect.CommandText = "select * from Customers"
Me._cmdSelect.Connection = Me._cnx
'
'_ds
'
Me._ds.DataSetName = "Customers"
Me._ds.Locale = New System.Globalization.CultureInfo("fr-FR")
'
'_tbcID
'
Me._tbcID.HeaderText = "ID"
Me._tbcID.MappingName = "CustomerID"
Me._tbcID.NullText = " "
Me._tbcID.ReadOnly = true
Me._tbcID.Width = 80
'
'_cnx
'
Me._cnx.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";Data
Source=E:\Projets\Customers\bas"& _
"e\Nwind.mdb;Persist Security Info=True"
'
'MainForm
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(564, 418)
Me.Controls.Add(Me._dg)
Me.Name = "MainForm"
Me.Text = "MainForm"
CType(Me._dg,System.ComponentModel.ISupportInitialize).EndInit
CType(Me._ds,System.ComponentModel.ISupportInitialize).EndInit
Me.ResumeLayout(false)
End Sub
#End Region
End Class
End Namespace Tag: Deploy to Windows Server 2003 & connect to Oracle database Tag: 89998
What do I have to do on Windows Server 2003 (other than install ODP.NET) to have my deployed WebApp connect to an Oracle database?