|
In that case the pool may be exhausted since it's user specific. If after a reboot he gets the error with the original username, it may be that the connection can't be established (for example sql server isn't listening on named pipes) and if that error occurs several times the pool may be depleted. So you may have two partly different problems at the same time.
Since he gets a named pipes error it's good to start resolving that by changing the protocol. After it's worked out concentrate on the connection problem (if it exists anymore).
|
|
|
|
|
Just a swag, but since only one client machine is affected, could that machine have the wrong Jet db engine installed?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
As a matter of interest, have you ensured that the connections have been disposed immediately after use? If you are acquiring connections for each database operations, it could be that the connection hasn't been closed and returned to the pool.
If you're using an enterprise database server, try monitoring the connections.
|
|
|
|
|
I did check the connections to the server with sp_who and by reading from sysprocesses, there are no connections open with his username when he is not actively using our system, and even when he is, there are 5 or less (with a max pool size of 100)
Is there a more efficient way of monitoring database connections?
|
|
|
|
|
Yes - you can monitor connections using SQL Profiler. I have an article here[^] that might help - it's not about monitoring connections, but the basic principals are the same, all you need do is change the events you want to monitor.
|
|
|
|
|
Hi,
I am using databindings to populate a combobox and several textboxes from a single datatable. When I select a record from the combobox, details of that record are displayed in the textboxes. This part of databinding works fine but when I make changes to the textboxes I want to update those changes back to the database. This update part is not working for me. No runtime errors but the db does not change. Can anyone help me? I am using a typed dataset "dsMySQL". My code is as follows:
// code for form_load
myDataAdapter.Fill(dsMySQL.DaySchoolsTbl);
cbxDaySchools.DataSource = dsMySQL.DaySchoolsTbl;
cbxDaySchools.DisplayMember = "SchoolName";
cbxDaySchools.ValueMember = "SchoolID";
tbxSchoolID.DataBindings.Add("Text",dsMySQL.DaySchoolsTbl,"SchoolID");
tbxSchoolName.DataBindings.Add("Text",dsMySQL.DaySchoolsTbl,"SchoolName");
cbxSchoolType.DataBindings.Add("SelectedIndex",dsMySQL.DaySchoolsTbl,"SchoolType");
// code for save_button
myDataAdapter.Update(dsMySQL.DaySchoolsTbl);
dsMySQL.DaySchoolsTbl.AcceptChanges();
|
|
|
|
|
Put a breakpoint on the row:
myDataAdapter.Update(dsMySQL.DaySchoolsTbl);
and check that the modifications are in the dataset and that the RowStates for the modified rows are not Unchaged . One reason could be that you accept all changes somewhere in the code before updating the data adapter.
Also you don't have to call dsMySQL.DaySchoolsTbl.AcceptChanges(); after update since if the update is succesful, it automatically accpets the changes. Actually, if something goes wrong during the update and you accept changes, the updates not yet taken to the db are lost.
|
|
|
|
|
Mika, thanks for your reply.
I have done a debug as you suggested and found that the row item in question has changed (when I changed the tbxSchoolName) but the RowState remains "Unchanged". Do you know why?
The test I am doing is simple enough, I display the form which loads the controls. I select a record from the Combobox which populates the Textboxes. I make a change to the Textbox. I click the 'Save' button to do the Update().
I have noticed that my changes in the Textbox 'tbxDaySchoolName' is not reflected in the Combobox 'cbxDaySchools'.
I have done a search and AcceptChanges() is not used on this form any more.
Obviously my 'select' command works but here is the code for the 'update' command:
// The Update command handles updates to existing rows
cmdUpdate = myConnection.CreateCommand();
cmdUpdate.CommandText = "UPDATE DaySchoolsTbl SET SchoolName=?SchoolName, SuburbID=?SuburbID, SchoolType=?SchoolType WHERE SchoolID=?SchoolID";
myParameter = cmdUpdate.Parameters.Add("?SchoolID", MySqlDbType.Int16, 40, "SchoolID");
myParameter = cmdUpdate.Parameters.Add("?SchoolName", MySqlDbType.String, 40, "SchoolName");
myParameter = cmdUpdate.Parameters.Add("?SchoolType", MySqlDbType.Byte, 1, "SchoolType");
myParameter = cmdUpdate.Parameters.Add("?SuburbID", MySqlDbType.Int16, 40, "SuburbID");
myParameter.SourceVersion = DataRowVersion.Original;
myDataAdapter.UpdateCommand = cmdUpdate;
Any idea what the problem is??
thanks
|
|
|
|
|
dragon_n_me wrote: row item in question has changed (when I changed the tbxSchoolName) but the RowState remains "Unchanged".
So the data in the column changes, but the row's RowState doesn't? Try to check the RowState immediately after you have modified the data (using tbxSchoolName). If the RowState is unchanged in that point, check the data bindings of the textbox. If it's changed, then you should investigate what clears the status after that.
|
|
|
|
|
I stopped at tbxSchoolName_Validating and neither data nor state has changed. I stopped at tbxSchoolName_Validated and only data has changed but RowState = "Unchanged". What can happen in between these 2 events?
|
|
|
|
|
Have you checked the binding collection's DefaultDataSourceUpdateMode also did yuo set the BindingContext somewhere in the code?
|
|
|
|
|
Hello Forum
I am new for this concept.
I want to create a web site in Asp.Net using c#.Net in which user can create his mail account like in code project,yahoo or gmail etc...
Do i need my own server?or the domain space will be sufficient on any server?
Any Basic Technology required?
Can any bdy tell me some steps to follow in the creation of that Web site
My basic Confusion is how and where to store the Mails and their format...?
Thanx n Regards
Rahul
|
|
|
|
|
Do not cross-post.
Regards,
Lev
|
|
|
|
|
Post in one forum and stick to it.
|
|
|
|
|
I've played with .NET/CLI for a while and have started learning MSIL/CIL.The following code compiles to a .NET executable without warning or error messages. ILASM reports in its output "Assembled global method HelloWorld."
.module HelloWorld.exe
.assembly extern mscorlib {}
.assembly MyAssembly
{
.ver 1: 0: 0: 0
}
.method public hidebysig static void HelloWorldHelper() cil managed
{
ldstr "Hello, World!"
call void [mscorlib]System.Console::WriteLine(class System.String)
ret
}
.class public auto ansi HelloWorld
extends [mscorlib]System.Object
{
.method public hidebysig static void HelloWorld() cil managed
{
.entrypoint
call void HelloWorldHelper()
ret
}
}
My question: how can consuming C# code access the HelloWorldHelper method? For example:
public class Program
{
public static void Main(string[] args)
{
HelloWorldHelper();
}
}
will fail to compile with "csc /r:HelloWorld.exe consumer.cs" with "error CS0103: The name 'HelloWorldHelper' does not exist in the current context."
(In case you wonder why I care about this arcane use, I am writing a compiler that targets the .NET run time.)
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
What would you expect to happen here? Your Main calls HelloWorldHelper which does not exist as a static method in the Program class.
|
|
|
|
|
Don't worry. I just did some more research and found that cross-assembly global references are not supported. I did this through writing MSIL code to consume the global function in another assembly and received a compile error informing me of this issue.
For anyone interested, here's the code and command lines:
.assembly extern mscorlib {}
.assembly helloworld
{
.ver 1: 0: 0: 0
}
.method public static void HelloWorld()
{
ldstr "Hello World!"
call void [mscorlib]System.Console::WriteLine(class System.String)
ret
} Compile with ilasm /DLL helloworld.il
.assembly extern mscorlib {}
.assembly extern helloworld
{
.ver 1: 0: 0: 0
}
.assembly Moo
{
.ver 1: 0: 0: 0
}
.class public auto ansi Program extends [mscorlib]System.Object
{
.method public hidebysig static void Main() cil managed
{
.entrypoint
call void [helloworld]::HelloWorld()
ret
}
} Compile with ilasm printer.il
You will receive something similar to the following error:
Microsoft (R) .NET Framework IL Assembler. Version 2.0.50727.3053
Copyright (c) Microsoft Corporation. All rights reserved.
Assembling 'printer.il' to EXE --> 'printer.exe'
Source file is ANSI
printer.il(17) : error -- Cross-assembly global references are not supported ('HelloWorld')
Assembled method Program::Main
***** FAILURE *****
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I created a DLL (class library) on C#.NET (2005) and want
to use it as an ActiveX control on a web page (html).
I have checked the box for Make "assembly COM visible" in the
project properties before I build the DLL. Code does do much,
here is my C# code for ctrl
namespace MyActiveXctrlLib
{
public partial class MyUserCtrl : UserControl
{
public string setName
{
set
{
txtName.Text = value;
}
}
public MyUserCtrl()
{
InitializeComponent();
}
}
}
here is my HTML
<title>Untitled Page
<object id="myControl1" name="myControl1" classid="MyActiveXctrlLib.dll#MyActiveXctrlLib.MyUserCtrl" width="288" height="50">
function doScript()
{
myControl1.setName = frm.txt.value;
}
on button click doScript(); is executed .
it sets the setName property of myControl1 i.e. WinForm control.
this code working successfully on IE 7.0 machine having .NET installed on them
but is not working on Machine those dnt have .NET installed on them.
not checked on IE 6.0.
Thanks in advance .
DaTtA
way2datta@gmail.com
|
|
|
|
|
C# cannot target building an actual ActiveX control. You can build a COM-exposed component (like you have already done) that, to IE, LOOKS like an ActiveX control, but, in order for your control to run on the client, the client MUST have the required .NET Framework installed. You cannot get around this requirement.
If you want a control that can be used without the .NET Framework, you'll have to rewrite it in a language that does not require the .NET Framework, like C++.
|
|
|
|
|
|
I think you want the ASP.NET or WPF forums. It doesn't sound like this has anything to do with VB.NET.
I think you mean that when the user presses F1 in their browser (while running your app), you want a help file for your app to come up instead of the help for the browser. AFAIK, you cannot change that behavior.
|
|
|
|
|
I publish my application evry week with latest updated version,
via internet...using CLICK ONCE....
I have take care of autheentication of the publishig person
It publishes fine...
Now Whenever I publish it, after publish,It ask for download latest version or not?
So I cant make the compultion to user to take the latest version...
Is there any option in click once that I can set,
So next time I publish user comapsary has to be get the update version or
It directly loads a new version application without asking user ?
|
|
|
|
|
You can use the ClickOnce API to detect and automatically install the update.
only two letters away from being an asset
|
|
|
|
|
How can I do this ?
Can youi give me steps or msdn link related to that topic ?
|
|
|
|
|
Try here[^]
only two letters away from being an asset
|
|
|
|