Posts
 
Reputation
Joined
Last Seen
Ranked #833
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
66% Quality Score
Upvotes Received
13
Posts with Upvotes
11
Upvoting Members
8
Downvotes Received
7
Posts with Downvotes
3
Downvoting Members
7
4 Commented Posts
0 Endorsements
Ranked #654
~18.7K People Reached
Favorite Tags
Member Avatar for prakashmca07

The above post is correct. I want to add when you use arraylist of objects, the public properties of the objects in that arraylist are similar to columns of your SQL queried data.

Member Avatar for rispy
0
113
Member Avatar for darkagn

I came searching this thread because I found my power to affect someone's reputation is +/- 1. I also observed that some other newbies have less posts or solved less problems and got more points. The only thread I got negative, in my honest opinion, are from idiots to put …

Member Avatar for Ancient Dragon
0
461
Member Avatar for ksp_852005

2 things I can think of: 1. What is data type of h? 2. Is the result "Hits from Admin" null if you run the query (like in SQL query analyzer or Management studio)? I would try something like this [code=c#] int iHits = 1; if (dr["Hits"] != DBNull.Value) { …

Member Avatar for padtes
0
250
Member Avatar for Lokesh_S

There are 2 steps: 1. declare parent page (superclass) [code=c#] public class ParentPage : Page { protected override void OnLoad(EventArgs e) { objLoginUser = (Users)Session["LOGINUSER"]; if (Session["LOGINUSER"] == null) { // you got no logged or session expired...refirect etc. } //end if } } [/code] And other step is [icode] …

Member Avatar for padtes
0
89
Member Avatar for Helium

There is some wiered solution I got in mind. See if it works. [code=sql] alter table your_table add column tmpSno int identity(1,1) Go update your_table set ID = tmpSno Go alter table your_table remove column tmpSno Go [/code] Get the idea, the syntax might need re-checking Close this if it …

Member Avatar for apegram
0
152
Member Avatar for Traicey

Is there a chance of using hyper link? One or all your columns could be hyperlinks and the link itself would be something like [code=ASP] <a href='newWebForm.aspx?key=' <%= bind-key %>'>your column data</a> [/code] Other is, since you are handling color change to show current selected row, you are already handling …

Member Avatar for Traicey
0
124
Member Avatar for campkev

I would like to see stack trace and the corresponding source code with line numbers. Make sure .PDB file is latest. I guess it is not easy to reproduce, otherwise debugger would have helped.

Member Avatar for Ezzaral
0
208
Member Avatar for sasidhars

I wouldn't rely on @@rowCount. Plus, logic for user login / email looks "liberal", one can enter valid login and invalid email. My preferred logic would be: [code=sql] ALTER procedure [dbo].[users_login] (@username varchar(50),@password varchar(50), @emailid varchar(50),@ret int output) as begin set @ret=0 if @emailid <> '' or @username <> '' …

Member Avatar for padtes
0
109
Member Avatar for lebanese007

There are few suggestion for the post itself. I cannot see the reason for lot of blank lines. Because of that it is very discouraging to try reading the code. User Code tags, edit queries. Actual DB related GENERAL suggestions 1. reduce the size of your variables, though they are …

Member Avatar for JuhaW
0
109
Member Avatar for tqmd1

Given relational database normalization, you should not do that. What you do is join Sale and Code tables in your select statement. [code=SQL] Select c.code, c.product from code c inner join sale s on c.code=s.code [/code] However for some reason you do want to update the SALE table, just for …

Member Avatar for tqmd1
0
135
Member Avatar for moggy4

[QUOTE]SELECT HomePageSectionDescr,URL FROM HomePageSectionT System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.[/QUOTE] Which means your database is either …

Member Avatar for kadempalli
0
165
Member Avatar for Pari13

Check if there is divide by zero because TextBox3.Text is blank or 0. Write you if upfront for that. In addition, simple int might not be large enough, but that doesn't seem to be the current error. please mark thread closed if this helps. Otherwise post your solution if any.

Member Avatar for Pari13
0
128
Member Avatar for RahulV

The above query by apegram is in general good, except for sort by cost. Typically if there was credit or discount (negative cost). Also grand total shows ugly harcoded custID. The solution is slight modification to the same, though credit goes to apegram for writing the workable query. [code=sql] select …

Member Avatar for padtes
0
840
Member Avatar for malinkam

I assume you got a form that has City text box, say its [icode] <input ID='city' valye='' name='city' /> [/icode] Now your sql need to be [CODE] sql= "select count(city) as cx from NY where CITY='" & request("city") & "'" [/CODE] Please check / correct syntax. I am kind of …

Member Avatar for padtes
0
91
Member Avatar for Pari13

In addition, as adatapost suggested above, clarify the search requirement, such as what is that the user is searching? Your database? Your site? All of net? Of course once you try and you share your code, others can discuss further.

Member Avatar for padtes
0
73
Member Avatar for samuel_1991

I am not sure how you are loading the dataset that has previously purchased products for the customer. Can you pass that customer ID as parameter and re-query that in you query and use something like [icode] ShopCartItem.ProductID not in (select ProductID from pastPurchase where custID=@custID) [/icode] May be there …

Member Avatar for samuel_1991
0
174
Member Avatar for Troy382438

There are so many errors with these, that I don't know how to correct all of it. There are 9 instances, I got tired after 7 I have pointed for some help. Looks like this is your homework. I wonder if it is even Ok to help you. anyway here …

Member Avatar for ChrisPadgham
0
202
Member Avatar for vbdotnetlover

Assuming you want order by date (SQL server 2005 or higher) [code=sql] select row_number() over (order by [date]) as serNo, * from ( SELECT [date], SUM(Qty) AS Qty, FROM mytable GROUP BY [Date] ) t [/code] For SQL 2000, stored proc with temp table with auto increment column [code=SQL] create …

Member Avatar for achieveSenthil
0
124
Member Avatar for bonnysammy

From the code snippet it is not clear to me if the [icode]asp:TextBox ID="IDNum"[/icode] is part of edit template or not. Also it is not clear if your question is related to DB operation or reading data from page or both. If it is not part of grid's edit template …

Member Avatar for padtes
0
141
Member Avatar for vbdotnetlover

first doc it to say right hand side by pulling the dialog title bar (here the blue bar that says Solution Explorer), click and hold and drag to one side where there will be an arrow like image will appear once you do this. Or double click on the title …

Member Avatar for padtes
0
115
Member Avatar for wild_angel

I am not sure how the whole thing is supposed to work, but it being Java, indexes are 0 relative. try this [code=java] if (rs.last()==false){ tabel.setValueAt(rs.getString(0), 0, 1); } else { tabel.setValueAt("", 0, 1); } [/code] Close the thread if this helps

Member Avatar for wild_angel
0
229
Member Avatar for manjunath_praj

Depending on events (like _RowCancelingEdit or _RowEditing) you want to use true or false for ShowFooter. [code] gv_Money.ShowFooter = false; [/code] Please mark as solved if this is sufficient.

Member Avatar for padtes
0
127
Member Avatar for hitro456

try this [code] int returnVal = 0; if (rdr[0] != DBNull.Value) { returnVal = Convert.ToInt32(rdr[0]); } [/code] I wonder how VS did not give you auto suggestion for this.

Member Avatar for hitro456
0
146
Member Avatar for Waddiwassi

I find [URL="http://www.fluffycat.com/"]http://www.fluffycat.com/[/URL] very helpful. I hope it helps you too.

Member Avatar for Waddiwassi
0
169
Member Avatar for tqmd1

I can think of a sotred proc, where you will generate a temp table of 1 column and insert 1 .. max(sno) and then delete existing. [code] create table #tmpNum (id int) declare @mx int select @mx=max(sno) from table1 while @mx >= 1 begin insert into #tmpNum values (@mx) set …

Member Avatar for padtes
0
104
Member Avatar for makdu

I would personally prefer a console application, not windows application. If you have main logic code extracted outside of form, you can easily put together a console app. However I do expect WinForm to have .visible = False possible. Problem is on what event of the form are you expecting …

Member Avatar for makdu
0
243
Member Avatar for bajanpoet

Would you rather subtract 52 weeks from your @LastBusinessDay? Because, even if today was Wed Jan 13 2010, Last year Jan 13 is Tue. [icode]select dateadd(wk, -52, getDate())[/icode] See if this is better? If it helps lets close this thread.

Member Avatar for bajanpoet
0
2K
Member Avatar for capiono

If this is stored proc, it is sure simple. [code] SET @returnValue = 0 SELECT @returnValue = 1, item FROM TABLE -- @returnValue = 1 means there were records in the table [/code] if you want this as part of one query, I would like to know how you are …

Member Avatar for mail2saion
0
188
Member Avatar for engisa

I think above anser is missing one point: [QUOTE]In the period field, there is time interval for the query to run.[/QUOTE] Assuming certain limitations, given below, other solution is to write stored procedure (as given above) and schedule it as a SQL server job. Limitation 1: you need to know …

Member Avatar for engisa
0
152
Member Avatar for pecet

I feel current structure is enough, if a country has no sea-border, there will be no record in SEA_BORDER for that country. As far as database is concerned your current structure is perfect. When finding countries with/without border with sea etc, you need to write correct SQLs (selecs).

Member Avatar for pecet
0
91