repeated rows?
hamit yıldırım posted at 09-May-08 11:03

I have X table like

1  xxx 236

2 yyy 237

4 ddd 236

5 fff  654

and my sentence

SELECT * FROM  X

WHERE // here I need a condition it will give me just 236

thanks




external library with un-serialized sealed class
david ste posted at 09-May-08 10:50

I have an external library I am using within my project which contains an event class which I display on a databound server control on my page. Currently the event class in the external library is not marked as serializable so if I enable view state on my server control then an error is thrown saying that the event object could not be serialised.

Unfortunately the event class in the library is also marked as sealed so I can not inherit this in to another class and mark the new class as serialized.

Any ideas as to how I can enable serialization for this object?




which control to use to display results in webpage
abc V posted at 09-May-08 10:24

Hi

I have a situation where i have to make a search page and there are various search criteria and checkboxlist user selects 2 or more and clicks on go button to get the results

Dropdownselection1

<<<list showing all the results under Dropdownselection1>>>

Dropdownselection2

<<<list showing all the results under Dropdownselection2>>>

Please help asap. Thanks alot in advance

 

 

 

 




tooltip for each element in dropdownlist control from db and also the tooltipo description in db
abc V posted at 09-May-08 10:18

Hi

I have a dropdownlist control and all elements in that control are populated from the database and also the description for each element selected is populated from database. please help thanks




Ajax dll prob after uploading.............
Sujit Patil posted at 09-May-08 07:33

Hello All,

I am new to Ajax. I am using ajax dll in my appl. Its working fine.

I published it and uploaded it on server. But while accessing any page it is giving me error that "dll should be compiled first "

Error : Could not load the assembly 'App_Web_tq-udmuu'. Make sure that it is compiled before accessing the page.

I am not sure wheathere this is a ajax error or something i did wrong :-(

Can anybody help me????

Thanks in adavance,

Sujit.




Window Application Deployment
Sanjay Verma posted at 09-May-08 07:18

I am making one windows application in VB.NET. I am using SQL Server as database.
So, my question is if I want to deploy the .exe file to the client. Then is it necessary that SQL server should also be installed in
his computer?

And if not, how can he maintain his database with my application. I mean what files I should supply to him with SetUp exe.?

As I am new to Windows Application, can anyone explain about it... or give some article links so I can understand the whole process
from creating application to End User deployment.

Thanks for help in advance.




Exception Handling
c g posted at 09-May-08 04:30

In my development environment when an error is raised in my Buiness Layer I rethrow the exception and the message of he Exception is displayed.

For example : Cannot Update where Record Status is Closed  is displayed. Record ID 369448

When I deploy my app to both the System Test and UAT environments the user gets below :

-- System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: Error: Cannot Update where Record Status is Closed'. Record ID 369448 at FCS.FinesBL.CreateFine(XmlDocument FinesXML) --- End of inner exception stack trace ---

Anyone know why the extra exception details are displayed in System Test and UAT and not in or development environment?

I am baffled.




File Upload prob....
shreya verma posted at 09-May-08 04:25

why this is error is here????

Could not find a part of the path 'E:\SkillInventory1\Uploads\link for message plz wait.txt'.

when i upload a file through browse button and update it this error is coming

and if m not uploading the file then updation is not done it's not working

See code

protected void btnUpdate2_Click(object sender, EventArgs e)

{

string EmpID = (string)Request.QueryString["empid"];

try

{

if (FileUpload1.FileName != "")

{

string strSource = FileUpload1.PostedFile.FileName;

string strDestination = AppDomain.CurrentDomain.BaseDirectory + "Uploads\\" + FileUpload1.FileName;

File.Copy(strSource, strDestination);

}

string constr = ConfigurationManager.ConnectionStrings["ConStr"].ToString();

SqlConnection con = new SqlConnection(constr);

con.Open();

SqlCommand cmd = new SqlCommand("[Usp_UpdateProfile]", con);

cmd.Parameters.AddWithValue("@name", txtEmpName.Text);

cmd.Parameters.AddWithValue("@mysiteurl", txtMySiteURL.Text);

cmd.Parameters.AddWithValue("@ro", txtRO.Text);

cmd.Parameters.AddWithValue("@email", txtEMail.Text);

cmd.Parameters.AddWithValue("@resume", FileUpload1.FileName.ToString());

cmd.Parameters.AddWithValue("@empid", EmpID);

cmd.CommandType = CommandType.StoredProcedure;

cmd.ExecuteNonQuery();

con.Close();

}

catch (Exception ex)

{

Response.Write(ex.Message);

}

Directory.CreateDirectory(MapPath(".") + "\\ Uploads ");

}




Project Architecture
divya rocks posted at 09-May-08 03:15

hi, What is project Architecutere, i heard this word in dot net project development. if any failures in  projects.. many of our coligues saying that it is  caused  for lack of  project architecture.. what phases are involved in project development.????.. who will  design architecture...??

plz let me know

thank u..




Webpage alignment changes in Mozilla firefox when compare to Internet Explorer
touseef ahmed posted at 09-May-08 03:03

Dear

I have done a webpage using Visual Studio 2005 in Asp.Net.. It was successfully completed. Wen i run in Internet Explorer, runs well and the same wen i run in Mozilla Firefox all the alignment in the page been changed... So what should i do to solve the problem...




How to show resulting records columnwise in sqlsever 2000
Prakasam J posted at 09-May-08 02:59

Hi all,
I have 3 tables named Location, Products and Orders

Location table columns are LocationIDand LocationName

Products table columns are ProductId, ProductName

Orders table columns are ProductId, LocationID, OrderedQty

the location table sample data is
+----------------------------+
|LocationID | LocationName  |
+----------------------------+
|1              | Location1           |
|2              | Location2           |
|...                                         |
|N              | LocationN         |
+-----------------------------+

Products Table Sample data is
+----------------------------+
|ProductID  | ProductName   |
+----------------------------+
|1000              | xxxxxx          |
|1001              | yyyyy            |
|...                                         |
|9999              | nnnnn            |
+-----------------------------+

Orders Table Sample data is
+------------------------------------------+
|ProductID       | LocationId | OrderedQty  |
+------------------------------------------+
|1000              | 1            |        10              |
|1000              | 2            |        00              |
|1000              | 3            |        20              |
|1001              | 1            |        15              |
|1001              | 2            |        45              |
|1001              | 3            |        05              |
|9999              | 1            |         00             |
|9999              | 2            |         90             |
|9999              | 3            |         50             |
|..                    |               |                          |
+------------------------------------------+


I want to show the Orderd quantity of the each locations in columnwise
like
+--------------------------------------------------------------------+
|ProductId | ProductName | Location1    | Location2   | Location3      |
+--------------------------------------------------------------------+
|1000       | xxxxx            |    10           |        0       |        20                |
|1001       | yyyyy            |    15           |      45       |        05                |
|...            |                      |                   |                |                             |
|999         | nnnnn            |    0             |      90       |        50                |
+--------------------------------------------------------------------+

How to write sql query for the above output in sql server 2000.

Thanks in advance

 




What's the prob??
shreya verma posted at 09-May-08 02:48

See, what's the problem out there in my code, it's not working. i tried even it with using breakpoint. while opening the page after login details are not shown on the page

Code

protected void Page_Load(object sender, EventArgs e)

{

string EmpID = (string)Request.QueryString["empid"];

if (!Page.IsPostBack)

{

txtEmpName.ReadOnly = true;

txtMySiteURL.ReadOnly = true;

txtRO.ReadOnly = true;

txtEMail.ReadOnly = true;

FileUpload1.Enabled = false;

btnUpdate2.Enabled = false;

}

SetValue(EmpID);

}

 

private void SetValue(string EmpID)

{

EmpID = (string)Request.QueryString["empid"];

{

string constr = ConfigurationManager.ConnectionStrings["ConStr"].ToString();

SqlConnection con = new SqlConnection(constr);

con.Open();

SqlCommand cmd = new SqlCommand("Usp_SetEmpById", con);

cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.AddWithValue("@empid", Convert.ToInt32(EmpID));

SqlDataReader sdr = cmd.ExecuteReader();

while (sdr.Read())

{

txtEmpName.Text = sdr["EmpName"].ToString();

txtMySiteURL.Text = sdr["MySiteURL"].ToString();

txtRO.Text = sdr["ReportingOfficer"].ToString();

txtEMail.Text = sdr["EMail"].ToString();

}

con.Close();

}

}




Internet Explorer vs Mozilla Firefox
touseef ahmed posted at 09-May-08 02:47

Dear xxx..

I have done a webpage using Visual Studio 2005 in Asp.Net.. It was successfully completed. Wen i run in Internet Explorer, runs well and the same wen i run in Mozilla Firefox all the alignment in the page been changed... So what should i do to solve the problem...

 




Tell.....
shreya verma posted at 09-May-08 02:19

Can we do this,

ALTER TABLE [dbo].[EmployeeProfile]

ADD (EmpID) REFERENCES [dbo].[Login1] (UserID);




Error when fetching data thru Link server
Rajesh Kallakuri posted at 09-May-08 01:18

When i am trying to fetch data from linked server i am getting two types of error messages:

Error 1:
Msg 18452, Level 14, State 1, Line 0
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.

Error 2:
OLE DB provider "SQLNCLI" for linked server "premierprw" returned message "The transaction manager has disabled its support for remote/network transactions.".
Msg 7391, Level 16, State 2, Line 1
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "premierprw" was unable to begin a distributed transaction.

Regarding Error2: how can i execute distributed transation in my server.

Thanks in Advance




TreeView is not beeing updated and displays old information after page changes
ali fakheri posted at 09-May-08 12:57
Hi - I'm hoping some can help me out cuz I'm driving myself nuts with this.
I can bind a treeview control to a xmldatasource control just fine.  I add
both controls then in code I bind the xmlds obj to the xml string, then set
some binding props in the treeview and bind away.  The required data
displays in the tree.
Now here is where it gets crazy...I'm progammatically deleting and adding
data in the source via a web service. The actions work fine cuz when I get
the lastest xml data it is updated correctly.  When I got to thru the above
process again and bind to the treeview the old data displays in the tree!
How can this be? I bascially have to shut down VS'05, restart IIS, delete
the contents of "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files" then restart VS'05.  Upon running the project the new data
appears.
This has got to be something really stupid.   I'm thinking I'm not updating
the tree binding correctly or there is some sort of cache problem.

Thanks in advance.
Ali



how to placed publised code of on web application inside other.
imran khan posted at 09-May-08 12:16

Dear All,

 i am using asp.net2.0 ,C# .

let me tell you scenario.

i built a web application called daily call report that have two classes in the folder app_code and other aspx  file and its code behind file.

now i have to deploy this web application but problem is I have to incorporate this web application other web application that is my site will run thrugh other application whenever user select to go my site.

now i published my whole project and placed the all dll inside root folder (that is i placed my aspx pages inside folder called dailycallreport and all respective dll to bin folder ) now issue is the classes i have wriiten generates app_code dll and it conflict with existing app_code dll. i placed bin inside dailycallreport folder but i is not recongnizing . client is not giving all classes they used so it not possible to overwrite the same app_code

i would like to know how can i placed my class file dll so that other setting does not affect ..

please suggest something.

 

Thank you.




Decomission of interface....
Regie Reyes posted at 08-May-08 11:39

Please help me to explain this sample query.please.... email me daumentze@yahoo.com

 

begin tran --rollback  --commit

 

delete from tbl_autosys_info where configuration like 'INT-355%'

delete from tbl_autosys_info where configuration like 'INT-356%'

delete from tbl_autosys_info where configuration like 'INT-357%'

delete from tbl_autosys_info where configuration like 'HRPEO-I0115%'

--10rows

 

delete from [db_IntegrationAnalytics].[dbo].[tbl_AutoBuildRef_Connections] where interfaceid like 'INT-355%'

delete from [db_IntegrationAnalytics].[dbo].[tbl_AutoBuildRef_Connections] where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].[tbl_AutoBuildRef_Connections] where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].[dbo].[tbl_AutoBuildRef_Connections] where interfaceid like 'HRPEO-I0115%'

--0 rows

 

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_fieldinterface where interfaceid like 'INT-355%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_fieldinterface where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_fieldinterface where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_fieldinterface where interfaceid like 'HRPEO-I0115%'

--(42 row(s) affected)

 

delete from tbl_fields where sourceapp ='20156ACA-EEF0-4A76-AFAA-5F9F95FE02F2'

--(42 row(s) affected)

 

delete from [db_IntegrationAnalytics].[dbo].[tbl_InterfaceNotifications] where interfaceid like 'INT-355%'

delete from [db_IntegrationAnalytics].[dbo].[tbl_InterfaceNotifications] where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].[tbl_InterfaceNotifications] where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].[dbo].[tbl_InterfaceNotifications] where interfaceid like 'HRPEO-I0115%'

--6 rows

 

delete from db_ebiconfiguration_node1.dbo.[ssis configurations] where configurationfilter like 'INT-355%'

delete from db_ebiconfiguration_node1.dbo.[ssis configurations] where configurationfilter like 'INT-356%'

delete from db_ebiconfiguration_node1.dbo.[ssis configurations] where configurationfilter like 'INT-357%'

delete from db_ebiconfiguration_node1.dbo.[ssis configurations] where configurationfilter like 'HRPEO-I0115%'

--148 rows

 

delete from db_ebiconfiguration_node2.dbo.[ssis configurations] where configurationfilter like 'INT-355%'

delete from db_ebiconfiguration_node2.dbo.[ssis configurations] where configurationfilter like 'INT-356%'

delete from db_ebiconfiguration_node2.dbo.[ssis configurations] where configurationfilter like 'INT-357%'

delete from db_ebiconfiguration_node2.dbo.[ssis configurations] where configurationfilter like 'HRPEO-I0115%'

--148 rows

 

delete from [db_IntegrationAnalytics].[dbo].tbl_Master_Events where interfaceid like 'INT-355%'

delete from [db_IntegrationAnalytics].[dbo].tbl_Master_Events where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].tbl_Master_Events where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].[dbo].tbl_Master_Events where interfaceid like 'HRPEO-I0115%'

 

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_frequency where interfaceid like 'INT-355%'

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_frequency where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_frequency where interfaceid like 'INT-357%'

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_frequency where interfaceid like 'HRPEO-I0115%'

 

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_interfaceautosys where interfaceid like 'INT-355%'

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_interfaceautosys where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_interfaceautosys where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_interfaceautosys where interfaceid like 'HRPEO-I0115%'

 

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_interfacecontact where interfaceid like 'INT-355%'

delete  from [db_IntegrationAnalytics].[dbo].tbl_rel_interfacecontact where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_interfacecontact where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].[dbo].tbl_rel_interfacecontact where interfaceid like 'HRPEO-I0115%'

 

delete from tbl_interfaces where sourceapp ='20156ACA-EEF0-4A76-AFAA-5F9F95FE02F2'

or targetapp='20156ACA-EEF0-4A76-AFAA-5F9F95FE02F2'

--(6 row(s) affected)

 

delete from tbl_applications where applicationid in ('20156ACA-EEF0-4A76-AFAA-5F9F95FE02F2')

--(1 row(s) affected)

 

delete from [db_IntegrationAnalytics].dbo.tbl_SecureTransport_Configuration where interfaceid like 'INT-355%'

delete from [db_IntegrationAnalytics].dbo.tbl_SecureTransport_Configuration where interfaceid like 'INT-356%'

delete from [db_IntegrationAnalytics].dbo.tbl_SecureTransport_Configuration where interfaceid like 'INT-357%'

delete from [db_IntegrationAnalytics].dbo.tbl_SecureTransport_Configuration where interfaceid like 'HRPEO-I0115%'

--7 rows

 

--43 rows

--Total 446

 




Insert an Apostrophe in a formula
arad lahiji posted at 08-May-08 05:24
This is probably a really dumb question but im new to this. 
I'm trying to put in a code for VB to automatically insert a formula into a specific cell.
My formula has an apostrophe in it because it refers to another workbook...
ActiveSheet.Range("B66").Formula = "=pull(" '"&mfpn&wsn&"'!"&ct)"

MFPN, WSN, and CT are all cell references, not variables. So basically I want that whole quote to be inserted into the cell.
Everything after the first apostrophe is converted into a comment...Is there a work around?

please help!!
 



Adding cells based on the date
Kristian Morphis posted at 08-May-08 05:18

What formula could I use to add the the cells together which corespond to to a certain month and year.

The dates are in D2:D1584 and the Fees that need to be added are in K2:K1584

Thank you