|
Sorry, it didnt display how i typed it.
the blank values do have data in:
Server=server\instance;Database=database;User Id=username;Password=password;
the Bold values are masked
as i have said i did manage to connect a couple of times, with the same connection string, so i cant see that being an issue
thanks
|
|
|
|
|
Hi,
try this ..
connectionString="Data Source=<database server="" ip="">;Initial Catalog=<databasename>;Persist Security Info=True;User ID=<user id="">;Pwd=password"
Charith Jayasundara
|
|
|
|
|
Hi Charith,
Thanks for your input.
As I said in my post. My application connects sometimes and not others. At the minute it is working, so I can verify that your connection string suggestion is valid. but so is the connection string I was originally using so I can not say that my solution is solved.
|
|
|
|
|
This could be a connection pool issue. Have you tried disabling connection pool; Specify Pooling=false to your connection string and test if it has any effect.
Also is the message 'error: 26 - Error Locating Server/Instance Specified' still the one you receive or are you getting any other messages.
|
|
|
|
|
Thanks for your reply Mika,
Curently my application is connecting and setting the Pooling=False has no noticable affect. From what I just read about Pooling thou, it seems best to leave this at the default 'True' value as it can improve performance with database applications the use the same connection strings over and over again.
(http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx[^])
Whenever I cannot connect the 'error: 26' message is the only one I have ever recieved in regards to this issue.
At the moment the application has been able to connect with no errors since last night, so fingers crossed that it stays that way :P
If the problem has been solved in my case then I can only conclude that there was an issue with some server setting. If I manage to find a definative answer to my problem I will post my findings here.
|
|
|
|
|
musefan wrote: Curently my application is connecting and setting the Pooling=False has no noticable affect
Ok, so it seems that the pooling isn't affecting
musefan wrote: what I just read about Pooling thou, it seems best to leave this at the default 'True'
Absolutely. The idea was just that you should test if the pool acts correctly. In some situations you can end up with connections in the pool but they won't work thus leading to an error.
musefan wrote: At the moment the application has been able to connect with no errors since last night, so fingers crossed that it stays that way
Let's hope so.
|
|
|
|
|
Nope it gave in eventually.
Now I am using the server IP address and instance name and worked as soon as I changed it. If this lasts then there must be some issue with resolving the DSN at some times and not other.
Any ideas on this?
|
|
|
|
|
Hi all,
I have a problem. I'm using VS2005 and I'm writing a web service. It's been working fine so far. Now, when I try to debug the code whenever I step over/in a line of code it goes to some random line elsewhere in the code.
Sometimes, when I stop the program and then run again it automatically stop on a breakpoint without even Invoking the web service!!
I tried Cleaning the solution, removed all .pdb files but nothing helped. Does anybody have a solution for this because it's driving me crazy!
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
Is it multi-threaded application?
Charith Jayasundara
|
|
|
|
|
no ... it's just a webservice.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
There's no chance that there are multiple calls occurring to the webservice during your debugging?
|
|
|
|
|
This usually happens when the source file and the pdb files are out of sync. This means the compiled version does not correspond to the current version of the source files.
Erase all binaries, unGAC if necessary.
|
|
|
|
|
Hi,
I am running something on a loop till a certain condition meets. I have two options,
1. Create a timer and execute the loop.
2. This is already running in a child thread so I can just add a while (condition) loop with Thread.Sleep()
I prefer to use the second one. But I am not sure which one is the best..
Any Idea?
Thanks!
Charith Jayasundara
|
|
|
|
|
Charith Jayasundara wrote: I am running something on a loop till a certain condition meets
Charith Jayasundara wrote: his is already running in a child thread so I can just add a while (condition) loop with Thread.Sleep()
Thread.Sleep blocks the current thread for specified time. If your thread slept, how can you check whether the condition met or not? Your question is not clear.
|
|
|
|
|
A timer is always best, sleep loops are very ugly and poor form IMO.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello
I add a record to a table with a web service
I use a winform for calling this web service
now, my question:
when new record added, i want the datagrid points to new record
if there is a link about my question, plese put it herer
thanks
|
|
|
|
|
You can catch some event of the DataGrid and set the selectedRow ?
Charith Jayasundara
|
|
|
|
|
Hello
I do it with "for" and not with event(s)
and this way is not a good solution
for(int i....){
}
|
|
|
|
|
I have a project server 2007. using its event handler i want to run "notepad" against some perticular event (trigerred by project professional). The project server is running an eventing service under the user "Network service" that processes the event handlers registered to the project server. Event handler is written as a class library and the generated dll is registered in the project server's event handler. Following is the code which is failed to run a notepad application, resulting an error message mentioned in the subject:
public override void onpublish(PSContextInfo ps, ProjectPostPublishEventArgs e)
{
SecureString ssPwd = new SecureString();
foreach ( char c in "password" )
ssPwd.Append(c);
Process myProcess = new Process();
myProcess.StartInfo.FileName = "Notepad.exe";
myProcess.StartInfo.CreateNoWindow = false;
myProcess.StartInfo.RedirectStandardError = true;
myProcess.StartInfo.LoadUserProfile = true;
myProcess.StartInfo.Domain = "myDomain";
myProcess.StartInfo.User = "domainAdmin"; // domain administrator
myProcess.StartInfo.Password = ssPwd;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start();
}
Any help ???
Madni
|
|
|
|
|
|
Don't ask the same question twice, its a waste of time.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i have multiple monitors connected to my system.and i want to show different forms for each monitor how it is possible.
Thanks in Advance
nothing
|
|
|
|
|
I doubt if it is possible as the user can drag app windows from monitor to monitor. I could be wrong though.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
The System.Windows.Forms.Screen class and its static AllScreens property will allow you to get all the screens on your system. From there you should be able to use each screen's properties (Bounds, WorkingArea etc) to achieve what you want. I've never tried it but it should work.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I have one project with 5 asp page. In every page are 2 javascript grids. I need to save both grids(width of columns, while columns) in cookie.
Is possible? if so then how?
Help please.
|
|
|
|