
amir100
Avatar/Signature-
Posts
191 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by amir100
-
I am assuming you're doing a client side validation. That is you're doing the validation using client side scripting. That's why I suggested using an HTML Button Control instead of the usual Server Button Control. If you're using the HTML Control then you don't have to worry about any postbacks.
-
How about using the HTML Controls?
-
Re: Two ideas I'd try the second suggestion first. Then I move on to the first suggestion. :)
-
I've found the source of the problem. The problem lies within the "Connection Timeout" property of the Website. My testing server sets that property to 120 seconds. Which means I only got 2 minutes to send a request for a web service, execute the requested method, and retrieve the response from the web server. Since the average time of execution for the web methods is 4 minutes, the HTTP connection is closed by the server before the client retrieve the response. Hence I got the "Underlying Connection was Closed" WebException. It looks like setting the Timeout property of each web service objects in the client to -1 isn't doing anything to prevent the web server from closing the HTTP connection. I believe this has something to do with persistent connection and what-not. I've tried a few trick to disable persistent connection from the client side but it's not working. In the end the best fix was setting a higher "Connection Timeout" property in the IIS. I set it to 900 seconds (15 minutes). Any comments? I was wondering what are the effects of increasing the "Connection Timeout" property. That and I'm still looking for a better solution. Anyone have a better idea?
-
4 minutes in average. Mind you that the exception only occured from time to time. It doesn't always throws the WebException I mentioned above. I've tested it in three different clients. Thanks for the reply.
-
I'm currently developing client windows applications accessing web services. I'm using VS.Net 2002. Now for the problems. Timeout It is to my understanding that sending synchronous web request will have a probability of experiencing time out. I'm creating an instance of my web service with the name "mywebservice". :D Now I'm accessing a web service method; let's say Method1. When I'm executing mywebservice.Method1(), I get "The operation timed out" exception message. An immediate solution to this problem was setting the timeout property of mywebservice to -1: mywebservice.Timeout = -1 Done. Too bad that solution doesn't last long enough. It leads to problem number two. Underlying Connection was Closed Yupe. It's a System.Net.WebException. The client cannot retrieve the response because the connection to the web server is closed. Closed? After reading a few references I discovered that it is due to the connection being timed-out but the client still thinks its open. What the ... @_@ Adding to the confusion is that the exception doesn't always occurred. Sometimes the code works perfectly fine without a single exception. What's with this behavior? I'm kinda stuck here. I'd appreciate any help you have to offer. But I've already set the time
-
I can see the problem now. However I can't find a decent clue to solving this problem. Since you're using a dropdownlist, I don't think there's any property available to set the number of items to display. I check it's counterpart HTML control. It is a fact that you cannot set the number of items to display on a dropdownlist. It is only possible with a listbox. Maybe you should consider another method of showing the "real estate" items. Btw I don't get your reason for not using the listbox. CMIIW.
-
owner draw?
-
It's possible in TextBox. But I don't think it's possible in ListBox. Have you seen it working somewhere? CMIIW.
-
Does the "fill" work? Have you set your crystal report "database fields" correctly? Is it to late for me to reply? :D
-
I'm back using VS .Net 2002. :( Okay so I'm trying to connect to SQL Server 2000. It's a simple deal. Piece of cake. No sweat. But ... Why is it that everytime I disconnect from my network, my connection to SQL Server always failed? This has given me some hard time. Any hints? Thx.
-
Yes, you can. Take a look at alreadyused's explanation. :D Hope it helps.
-
I was thinking of proposing hash tables to handle the problem. But I guess I got it wrong. I thought the problem was checking the evaluated string to the collection. But I guess it goes the opposite. Mondeo was asking how to check each item in the collection to the string. :D My deepest apology. :D
-
How about using hash tables? Judging from your code. It's like you're planning to use arrays as your collection. I don't think that would be wise since you have to iterate everytime you need to check your collection. CMIIW.
-
A "Select * ..." from that table would require a generally large resource from your database server engine. :p Careful.
-
I assume you're doing a web application development. So the different behavior relates to different browser right? Could you tell us what are those browsers? Btw are you talking about ListBox or DropDownList? I assume you're talking about ListBox because you mentioned scrollbars. For ListBox you can set the Rows property to do what you want. CMIIW.
-
If it's normalized then I don't see any other reason to split your table. If we're talking about performance then there's more to simply splitting tables. :D CMIIW.
-
I don't know if I have to ask this or not. But are you developing a windows application or a web application? :D It is confusing that you're using the "combo box" term but you also mentioned the Name and Value field. :D If you're developing a windows application. If this is true then it is out of my reach. I don't even think it's possible to do what you want. But if you're developing a web application then you should create a new item object (the class would be ListItem if I'm not mistaken). Within that new object you can specify different values for the Name and Value field. With that new object you're now able to add it. Hope it helps.
-
I believe it is possible to check the state of the connection before you close that connection. The syntax would likely look like this: If (yourConnection.State = ConnectionState.Open) Then yourConnection.Close() End If
-
Hi again Mondeo. :D What PlausiblyDamp said will indeed produce the result that you need. But here's an alternative. Maybe you'd like to consider using nested queries. SELECT id, name, quote FROM quotes WHERE quote = (SELECT MIN( quote ) FROM quotes) You'll have a broader view in query alternatives once you get a hang on to nested queries.
-
Error when updating access record
amir100 replied to Talk2Tom11's topic in Database / XML / Reporting
There are tons of reference out there about parameterized query. Here's one of those many: http://aspnet101.com/aspnet101/tutorials.aspx?id=1 Even MSDN should provide you with a quick start on using parameterized query. Back to your problem. Can you give us more detail about your code? Btw what type of exception did you code produce? Just trying to help. :D -
Sorry for the late reply Mondeo. I was sick for a couple of weeks. So what you're trying to do is to get the minimum price of each make and model right? In that case then you're halfway right. It's just that you need to fix your GROUP BY expression. Here's a general clue on using aggregate functions with GROUP BY expression. "You have to include all the columns in the SELECT expression which is not used by the aggregate function into the GROUP BY expression." So your query should be like this. SELECT make,model,term,MIN(price) FROM tblVehicles GROUP BY make,model,term Again. CMIIW please. :D
-
That would be difficult if you're simply using SELECT DISTINCT. It would be easier if you only needed to show VehicleID, Make, and Model. To do that you only need to use this query: SELECT DISTINCT VehicleID,Make,Model FROM tblVehicles You have to remember that SELECT DISTINCT is use to return the unique rows from performing the typical SELECT. Using the query above without the DISTINCT will return this result. 100 AUDI A4 100 AUDI A4 100 AUDI A4 101 AUDI A6 101 AUDI A6 101 AUDI A6 The DISTINCT will return this result. 100 AUDI A4 101 AUDI A6 I hope I'm clear enough with the explanation. The same comes by using GROUP BY. If you're only showing results without using aggregate functions (e.g. SUM, MIN, MAX) then there's no point in using a GROUP BY clause. Maybe you need to add a WHERE clause to your query. For example: SELECT VehicleID,Make,Model,Term,Price FROM tblVehicles WHERE Term = 12 I'm assuming Term's datatype is INTEGER or such. I hope you get my point. :D CMIIW Please. :D
-
How about maintaining a incremental counter so that you'll know how many matches you'll get?