Hi , i have one my sql database. what typoes of name space , conection string and anything. is use in our asp.ner with c# application..
plz help me

Posted On: Tuesday 20th of November 2012 04:23:38 AM Total Views:  515
View Complete with Replies

Related Messages:

Problem with select data. Help!   (173 Views)
I try to select data from my database where i will pull the data based on latest time and group by name. below are the sample data: ID Name Starttime Endtime 1 AAA 1/5/2012 8.00am 1/5/2012 10.00a.m 2 BBB 2/5/2012 9.00a.m 3 CCC 2/5/2012 10.00a.m 2/5/2012 3.00pm 4 AAA 2/5/2012 10.00a.m selectID,Name,Max(Start_Time),End_TimefromchambergroupbyName System will return me data as below: ID Name Starttime Endtime 2 BBB 2/5/2012 9.00a.m 3 CCC 2/5/2012 10.00a.m 2/5/2012 3.00pm 4 AAA 2/5/2012 10.00a.m 1/5/2012 10.00a.m System will automatic replace the empty value on End_Time on 'AAA' Can someone help me to fix the error.
Adding a duration to SQL query accessing an IBM iSeries server with DB2 - exception SQL0187   (409 Views)
I'm building a sqlquery in the code behind of an aspx page and loading the query into a session variable. The next aspx page presented has some code behind that accesses the session variable and makes it the SelectCommand for a SqlDataSource loading a GridView. Bit cumbersome but that part works. Problem is with the sql statement failing, throwing exception... SQL0187: Use of labeled duration not valid. Cause . . . . . : One of the following has occurred: -- A labeled duration is specified but is not the operand of the operators plus or minus. -- A labeled duration of years, months, or days is specified as the operand of addition or subtraction and the other operand is not date or timestamp. -- A labeled duration of hours, minutes, or seconds is specified as the operand of addition or subtraction and the other operand is not time or timestamp. -- A labeled duration of microseconds is specified as the operand of addition or subtraction and the other operand is not timestamp. -- A labeled duration is specified as the left operand of subtraction. -- The value specified for the labeled duration is not a numeric type. Recovery . . . : Correct the use of the labeled duration. Try the request again. ...the substitution of the session variable into the query looks like thisin the code... ...where t2.sordte>=('" + Session("StartDate") + "' + 3 DAYS) and... ...the failure being on the corresponding bit of the query that when the string is interpreted looks like (from the debug viewer)... ...where t2.sordte>=('04/20/2012' + 3 DAYS) and ... ...which I know is the failure point because when I change the code to makeit be... ...where t2.sordte>='04/20/2012' and ... ...the query works. Can someone show me what the correct syntax should be Or if I'm just doing it wrong show me how it should be done I think it has something to do with the DB2 syntax there being no addduration.
OCIEnvCreate failed with return code -1   (614 Views)
Hi: I'm using VS 2005, Oracle 11g and Application Server is VS2008. I've updated oracle clinet in the server since then getting error: OCIEnvCreate failed with return code -1; when try to pull data from oracle. Please help me.
I have a question on how to setup a table for use with a TreeView   (262 Views)
I have never had to set one up so I don't know how the layout should be done in order to know what goes with what node in the TreeView. I figured someone out here has done this with as many hits as the site gets. BTW,
The provider is not compatible with the version of Oracle client   (1391 Views)
I am having the error stated above. The stack trace is as follows: [OracleException:TheproviderisnotcompatiblewiththeversionofOracleclient] Oracle.DataAccess.Client.OracleInit.Initialize()+550 Oracle.DataAccess.Client.OracleConnection..cctor()+518 [TypeInitializationException:Thetypeinitializerfor'Oracle.DataAccess.Client.OracleConnection'threwanexception.] Oracle.DataAccess.Client.OracleConnection..ctor()+51 InputForm.SelectRegion()+123 InputForm.Initialize()+952 InputForm.Page_Load(Objectsender,EventArgse)+53 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtrfp,Objecto,Objectt,EventArgse)+25 System.Web.UI.Control.LoadRecursive()+71 System.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+3048 Some info's: Server: Windows Server 2008 R2 .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 Oracle.DataAccess, Version= Dev Computer: Windows Vista Business 32bit .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 Oracle.DataAccess, Version= My Code: OracleConnection cn; String con1 = ConfigurationManager.ConnectionStrings["myConnectionString"].ToString(); cn = new OracleConnection(); cn.ConnectionString = con1; cn.Open(); string mysql = "select region_code, 'Region ' || reg_rom " + "as region_name from pro_lib " + "where reg_rom is not NULL " + "order by sort_order"; OracleCommand cmd = new OracleCommand(mysql, cn); cmd.CommandType = CommandType.Text; I have checked all forums and posts regarding this error. They mention that there are 2versions of Oracle.DataAccess.Client on the server, I only have 1 version. This runs on VS2010, but when I publish the website the error above shows up. I checked my Oracle connection from the installer and connection test passed. I tried uninstalling Oracle and reinstall, but still the same. The query above I tried changing to 'select region_code, reg_rom, ...', still the same error... please HELP ME!!!
craete excel workbook with diffrent sheets and send it as attachment using memory stream   (416 Views)
hi, We are sending auto email of different reports to our client everyday in PDF with seprate email for each report..... But Now client wants all report should come in one Excel workbook with diffrent sheets containing diffrent report ... we are using memorystream to send email.... how to craete excel workbook with diffrent sheets and send it as attachment using memory stream ......
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.   (510 Views)
I have a vs2008 web application. it built fine and it was runing fine use visual studio development server, but when i use IIS web server, it gave me the following error, Can you anybody help with that
MySQL integration with ASP.NET4......   (265 Views)
Currently i am using MS-SQL Express..... Now my client asked me to use MySQL instead of MS-SQL. Can anyone help me how to connect and integration with My-SQL and i have no knowledge about My-SQL........ Thank You.
portable database with 4.0   (352 Views)
I want to architect application is such a way that it could handle any database(mysql, sqlserver, access etc). Can some one explain me complete architecture of application with database layers so I only change database server in configuration and the Data Access work with any database. I want to use 4.0. please explain complete strategy.
Com object Excel throwing error- Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a.   (625 Views)
I am getting the folloing error when i created was writing values to an excel. It runs on local mahcine but in server it is throwing error as follows. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a. I tried giving permission for Dcom objects in component services following this link . but still having issues. before giving acces i was gettingno disk space error for writing com object. Anyway, not working. Please guide.
parameter must be defined error on mysql with c#   (783 Views)
the below code gives Parameter '@row' must be defined error on filling data adaptor what is wrong with my code ... best regards StringBuilder sql = new StringBuilder(); sql.Append("SET @row:=0;"); sql.Append("SELECT * From ("); sql.Append("Select @row:=@row+1 As Rec_No, _Col1, _Col2"); sql.Append("From _Tab1) As _T1"); sql.Append("WHERE Rec_No > 1 And Rec_No
How to connect postgresql database with   (350 Views)
Hi , I have a problem with the connection with postgresql. I m using ms sql but I want to use postgresql. As I search, to use postgresal we need to add Npgsql to project. I downloaded it and added to project but it does not work. Can anyone have an idea about it and help me
.NET with Oracle 11 and Server 2008   (298 Views)
Does anyone have a good guide for getting a .NET app to work with an Oracle 11 database onWindows Server 2008 I have an app built by someone else I'm trying to get working on a different server.... I would've gladly used MS SQL.... Better yet, does anyone think it would be easier to convert the app to work with MS SQL It'sa simple and small database. It only has 4 tables.
Custom paging with mysql   (279 Views)
I want to do custom paging in gridview with mysql database. can anyone have store procedure to do custom paging using object datasource.
Connection pooling issue with microsoft enterprise library in mysql   (382 Views)
I am using microsoft enterprise libarary to connect to mysql using mysql .net connector (latest version 6.2.3) But i am facing a problem of too many connections and connection pool reached maximum limit issue. As connection is disposed by enterprise library iteself so i dont close the connection anywhere. So after two or three hours i found i have 100 mysql connections in sleep mode which are doing nothing and are not being reused from the code . So i want to ask is there any issue with my code or is there any issue with mysql connector please suggest me a solution so that i can rectify this issue as it is causing a lot of trouble to me.
Import from csv to SQL with >255 columns   (197 Views)
Hi Guys, Beentrawling the various SQL posts on here but haven't found anyone with the same issue as me, whcih is as follows: I'm writing a reporting toolthat, as a starting point, needs to create a DB table from a csv file. This csv file will have been created from exporting data from our old system (with the new system being the reporting tool) and can have up to 300 columns of data. I've been trying as follows: temptable=DBtabletobecreated strDomain=pathtocsvfile strFileName=thecsvfilename but am finding that only the first 255 columns get put in. I am assumg that the Jet driver is the one that is limiting the columns, or is there a registry setting somewhere that'll solve it quickly Is there another approach that'll work I've though of the following, but as it'll take a while to recode and test each time I thought I'd ask the experts first!! BULK INSERT: would mean that I'd need to pre-create the table first, but if the issue is with the Jet driver I'd surely get the same problem Use a datatable: it seems pretty fiddly and probably a lot slower, but I guess I could read into a dataset and then bind that to a table to insert Again the table would need to exist and the driver that I use to read from the csv would be the issue Do it one row at a time in a loop in the code: assuming I can read the file as text, I could then split the data in code into an array and create a insert statement (again to an existing table) for each row. With what could be 1000s of rows I can't imagine that this is the fastest solution! Any top tips on what is causing the limit, how I cna overcome it or alternative solutions would be greatly appreciated! Thx.
employee attendance with in/out times (was "Query Help Needed...")   (359 Views)
Dear Friends, I am in problem & have to solve one query. I have a one table with the empno, employee time in & time out, data, employee can go out & come in fequently in a day. I want to know that how much time every emp have attend in the company per day. I want to know that how much time every emp have not attend in the company per day(once he enter at morning and he come out in the end of the day) Kindly, do reply as soon as possible. I am enclosing data defination in txt file along with the data in the MS Excel file. Thanx in Advance... SuraReddy, Emani The Table Like this Create table emptime ( EMPCODE VARCHAR2(5), CARDNO VARCHAR2(5), EMP_CODE_NAME VARCHAR2(25), INOUTTIME TIMESTAMP(6), IOGATENO VARCHAR2(10), DOOR VARCHAR2(20), IN_OUT VARCHAR2(10) CARDDATE DTE ); Note: INOUTTIME this will only time like 03:45Am, 15:30PM CARDDATE this will only Dae like 25-09-2010
Need help with uploading a text file in to mysql database   (535 Views)
I want to upload a text file and stored to my database. the column on mydatabaseit is longblob type. I don't know much about this so if anyone can help I will
Customizing a gridview with data from an oracle DATABASE   (308 Views)
hey , i have dates stored in an Oracle DB , each date is related to an ID DATE IDENTIFIER 12/3/2010 34 11/3/2010 32 .... i have a grid view that contains all the identifiers ( with other informations) but now i'm stucked because , i need to hilight each row that contains and id having an occurence in the first table (with the condition that the referenced date should be in a specific interval (first and last day of the previous month )) !!!! for example ID INFO1 INFO 2 ..... 34 III IIII ..... this row has to be highlited! can you please help me thanks i've done this protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { string connectionString = "DATA SOURCE=;PERSIST SECURITY INFO=True;USER ID=scott;PASSWORD=mimo0205"; OracleConnection oracleConnection = new OracleConnection(connectionString); oracleConnection.Open( ); DateTime deb = Convert.ToDateTime(DateTime.UtcNow.AddDays(-DateTime.UtcNow.Day).AddMonths(-1)); DateTime fin = Convert.ToDateTime(DateTime.UtcNow.AddDays(-DateTime.UtcNow.Day+1).ToShortDateString()+" 00:00:00"); Label8.Text = deb.ToString(); Label9.Text = fin.ToString(); OracleCommand oracleCommand5 = new OracleCommand(); oracleCommand5.CommandText = String.Format("SELECT DATEENVOI from validationRPV where code_ag='" + e.Row.Cells[1].Text + "'"); oracleCommand5.Connection = oracleConnection; int i = 0; OracleDataReader oracleDataReader4 = oracleCommand5.ExecuteReader(); //i = oracleDataReader4. ////affichage des entretiens individuels while (oracleDataReader4.Read()) { DateTime dateRecup = Convert.ToDateTime(oracleDataReader4["DATEENVOI"]); if ( (dateRecup >= deb) & (dateRecup = deb) & (dateRecup
How to do dropdownlist search in with C# with mysql ?   (298 Views)
I got table name ( customer ) and field Name as ( customerId , companyName , personName and poscode ) in Mysql Now i have created search function by using textbox (txtCompanyName.Text) like where i can query companyName by entering data to textbox to search . Coding :- qry = "select * from customer where companyName='" + txtCompanyName.Text + "'"; Bt i want to do search by using1 dropdownlist(companyName , personName, poscode).For example i selectdropdownlist as companyName andenter thename in textbox and search. After that i select the same dropdownlist with personName field and enter the name of the person and search . How to do that and what is the mysql query for such case Please help .