Handling NULL value in XML using getStringVal

I have below query which works fine if column 'XML_COL' has values. This select statement fails if the value is NULL for

select xmltype(t.xml_col).extract('//fax/text()').getStringVal() from mytab t

How to handle rows with NULL values in the column 'XML_COL'.

Posted On: Saturday 29th of December 2012 01:39:34 AM Total Views:  394
View Complete with Replies

Related Messages:

syntax for making the column as unique   (186 Views)
I need help in finding out the syntax for adding unique constrant on the column. I have one column called username, which is NOT NULL already, but I also want this column to be unique(no duplicate). I could not find syntax which is working.
web server IIS issue - Oracle Related?   (101 Views)
Hi Not too sure what forum to ask this in, but this problem may be Oracle Client Software related, so maybe someone on here has experience of this type of issue Approx. once a day (sometimes twice), the Intranet becomes unavailable as a result of IIS hanging. 90% of the time, restarting IIS fixes the problem. The crash logs and event viewer show nothing of importance, you just see entries for IIS being restarted but nothing before that. The problem seems to be unrelated to any particular webpage/site or activity/volume on the server. The problem mostly occurs between 2-3am when activity on the server is very low. The config of the web server is... Windows 2000 IIS 5.0 Oracle Client MDAC 2.7 sp1 REFRESH Microsoft ODBC for Oracle driver Msorcl32.dll version 2.573.9030.00 Oracle ODBC driver SQORA32.dll version SQL Server driver SQLSRV32.dll version 2000.81.9031.38 We have several ASP pages which access Oracle databases, one page even retrieves results from 4 different Oracle databases. We have come across the following Microsoft Knowledge article which exhibits our exact symptoms and points to the Oracle versions on the server.;en-us;253449 Has anybody experienced anything like this My apologies if this is not an Oracle Related Problem.
Unique Constraints With Out having duplicate records. Or the other way round.   (154 Views)
Hi , Please read this post fully ( Appriciate Ur Patientence ) PK_YTCURR exists on the coulmns (kurst, fcurr, tcurr, gdatu) of table YTCURR in both PRO and ACP. Code: WWCIW_DBA@WW15> truncate table wwciw_sap.ytcurr; Table truncated. WWCIW_DBA@WW15> copy from wwciw_dba@ww04 to wwciw_dba@ww15- > insert ytcurr- > using- > select * from ytcurr FROM TO Array fetch/bind size is 5000. (arraysize is 5000) Will commit after every 5 array binds. (copycommit is 5) Maximum long size is 80. (long is 80) SQLRCN in cpytbl failed: -1075 SQLRCN in cpyyerr failed: -1075 ERROR: ORA-00001: unique constraint (WWCIW_SAP.PK_YTCURR) violated WWCIW_DBA@WW15> select name from v$database; NAME --------- WW15 WWCIW_DBA@WW15> truncate table wwciw_sap.ytcurr; Table truncated. WWCIW_DBA@WW15> insert into ytcurr select * from ytcurr@ww04; 594951 rows created. -- Now it dosent error, Strange WWCIW_DBA@WW15> commit; Commit complete. Now i use some temp table to check if really duplicates exists. Code: WWCIW_DBA@WW15>truncate table temp_ytcurr; Table truncated. WWCIW_DBA@WW15>copy from wwciw_dba@ww04 to wwciw_dba@ww15- > insert temp_ytcurr- > using- > select * from ytcurr FROM TO Array fetch/bind size is 5000. (arraysize is 5000) Will commit after every 5 array binds. (copycommit is 5) Maximum long size is 80. (long is 80) SQLRCN in cpytbl failed: -1075 594951 rows selected from wwciw_dba@ww04. 594951 rows inserted into TEMP_YTCURR. 594951 rows committed into TEMP_YTCURR at wwciw_dba@ww15. WWCIW_DBA@WW15>select kurst, fcurr, tcurr, gdatu, count(1) from temp_ytcurr 2 group by kurst, fcurr, tcurr, gdatu 3 having count(1) > 1 4 / KURS FCURR TCURR GDATU COUNT(1) ---- ----- ----- -------- ---------- M GRD USD 19990320 2 P USD PTE 19960901 2 -- Now I Load into YTCURR(after truncating it) excluding these records WWCIW_DBA@WW15>Truncate table TEMP_YTCURR; Table truncated. WWCIW_DBA@WW15>insert into TEMP_YTCURR select * from YTCURR@ww04; 594951 rows created. WWCIW_DBA@WW15>select kurst, fcurr, tcurr, gdatu, count(1) from temp_ytcurr 2 group by kurst, fcurr, tcurr, gdatu 3 having count(1) > 1 4 / no rows selected -- Now begins the interesting part. WWCIW_DBA@WW15> ed Wrote file afiedt.buf 1 Select kurst, fcurr, tcurr, gdatu from 2 ( 3 select ltrim(rtrim(t.KURST)) Kurst, ltrim(rtrim(t.FCURR)) FCURR, ltrim(rtrim(t.TCURR)) TCURR, ltrim(rtrim(t.GDATU)) GDATU 4 from temp_ytcurr t 5 minus 6 select ltrim(rtrim(y.KURST)) Kurst, ltrim(rtrim(y.FCURR)) FCURR, ltrim(rtrim(y.TCURR)) TCURR, ltrim(rtrim(y.GDATU)) GDATU 7 from ytcurr y 8* ) WWCIW_DBA@WW15> / KURS FCURR TCURR GDATU ---- ----- ----- -------- M GRD USD 19990320 P USD PTE 19960901 -- AS Expected. WWCIW_DBA@WW15> ed Wrote file afiedt.buf 1 Select * from ytcurr where (kurst, fcurr, tcurr, gdatu) in 2 ( 3 Select kurst, fcurr, tcurr, gdatu from 4 ( 5 select ltrim(rtrim(t.KURST)) Kurst, ltrim(rtrim(t.FCURR)) FCURR, ltrim(rtrim(t.TCURR)) TCURR, ltrim(rtrim(t.GDATU)) GDATU 6 from temp_ytcurr t 7 minus 8 select ltrim(rtrim(y.KURST)) Kurst, ltrim(rtrim(y.FCURR)) FCURR, ltrim(rtrim(y.TCURR)) TCURR, ltrim(rtrim(y.GDATU)) GDATU 9 from ytcurr y 10 ) 11* ) 12 / no rows selected -- AS Expected. WWCIW_DBA@WW15> ed Wrote file afiedt.buf 1 Select * from ytcurr where (ltrim(rtrim(kurst)), ltrim(rtrim(fcurr)), ltrim(rtrim(tcurr)), ltrim(rtrim(gdatu))) in 2 ( 3 Select kurst, fcurr, tcurr, gdatu from 4 ( 5 select ltrim(rtrim(t.KURST)) Kurst, ltrim(rtrim(t.FCURR)) FCURR, ltrim(rtrim(t.TCURR)) TCURR, ltrim(rtrim(t.GDATU)) GDATU 6 from temp_ytcurr t 7 minus 8 select ltrim(rtrim(y.KURST)) Kurst, ltrim(rtrim(y.FCURR)) FCURR, ltrim(rtrim(y.TCURR)) TCURR, ltrim(rtrim(y.GDATU)) GDATU 9 from ytcurr y 10 ) 11* ) WWCIW_DBA@WW15> / no rows selected -- Can expect it. WWCIW_DBA@WW15> select * from ytcurr where kurst like '%M%' and FCURR like '%GRD%' and TCURR like '%USD%' 2 and GDATU like '%19990320%'; MAN KURS FCURR TCURR GDATU UKURS FFACT TFACT CYDT CYTM XTFLNM --- ---- ----- ----- -------- ---------- ---------- ---------- -------- ------ ---------- 155 M GRD USD 19990320 .00339 1 1 19990319 235900 CENA01 155 MV GRD USD 19990320 .00339 1 1 19990319 235900 CENA01 -- Jus see the first record it indeed exists in main table YTCURR. This is were i am confused WWCIW_DBA@WW15> ed Wrote file afiedt.buf 1 select * from temp_ytcurr where kurst like '%M%' and FCURR like '%GRD%' and TCURR like '%USD%' 2* and GDATU like '%19990320%' WWCIW_DBA@WW15> / MAN KURS FCURR TCURR GDATU UKURS FFACT TFACT CYDT CYTM XTFLNM --- ---- ----- ----- -------- ---------- ---------- ---------- -------- ------ ---------- 155 M GRD USD 19990320 .00339 1 1 19990319 235900 CENA01 155 MV GRD USD 19990320 .00339 1 1 19990319 235900 CENA01 -- IN Temp Table we have same records. More confused I suspect some special characters to be present in a record, but again its not showing up with search by using like predicate '%--%' Please help Abhay.
Oracle/ColdFusion/bind variables   (114 Views)
Folks, Im trying to resolve the performance issue related to ColdFusion and dynamic list of variables in IN-list clause for various SQL statements. ColdFusion is not very good with bind variables and after several attempts developers made a decision not to use them. As a result, database is flooded with a bunch of similar SQL statements with the only difference in IN clause. The result high latch waits/contention and poor overall performance. The solution get back to bind variables. Do you know what be the best approach to it Unfortunately, I dont have a lot of experience in this area. Your help will be greatly appreciated.
SYSTEM tablespace, newbie   (86 Views)
forgive me, I am new at Oracle and was just "given" a Oracle 8.0.5 db. If I look in the schema manager app, I see that the system tablespace has 58.777 mb out of 60 mb in use. Is this a problem, and if yes, how can I resolve this Is there also a query which will return all extents with the max size and the usage so I can figure out where I am running into problems
suggestion required   (123 Views)
Can anybody suggest me for this problem Here we have Oracle 8i on Windows NT set up. I run the following Query to check how many number of times full table scan is taking place and got the following result select name,value from v$sysstat where name='table scans(long tables)'; name value table scans(long tables) 24519 The value for the Parameter DB_FILE_MULTIBLOCK_READ_COUNT is 16 My question is should I increase this value for the better performance.How much should I increaseWhat is the maximum limit for this parameter in Windows NT environment.
Partitioning Doubt ???   (72 Views)
Row-wise partitioning is possible. However, what about column-wise partioning. Is this possibe
Oracle/solaris monitoring commands   (147 Views)
Problem - An application running on Oracle 8.1.7 on Sun Solaris keeps freezing when user clicks save on application. By rebooting Unix box problem is resolved. 1) What can I look at on the Oracle side. 2) Is there anything that will show what command is being executed before the freeze. 3) How can I see cpu usage, disk io,virtual memory statistics, and processes for CPU and memory usage,network bandwidth usage, can view the entire kernel statistics tree on solaris Let me know
Role Based Authorization   (78 Views)
I have seen articles on Role Based Authorization in MS-Sql but i did not find any article in, can any one help metodevelop.i am acheived this cpncept using session user namei am enabling certain parts of website to group Aand certain parts of site to GroupB but when i have more groups i cannot use this method. Myrequirement is In Web applications, typically there exist certain parts of the site that only certain folks, or groups of persons can access. For example, imagine Web site used to administer the content on a company's public Internet Web site, where the public Web site lists products sold by the company. From the administrative site, all company employees might be able to make minor changes to the products' descriptions, quantity, and other such non-essential information. However, perhaps only a subset of trusted employees might be able to change the products' prices. And even a smaller subset of employees would be able to add new products or delete existing products from the database I would be delighted if any one provide the solution
Using Database Explorer without installing drivers   (163 Views)
Hi! I use Visual Studio with a computer where I don't have any administrator rights so I'm not able to install anything. I would like to see the database in the Server Explorer like in this tutorial On my private computer I have installed a MySQl ODBC Driver. Then it is easy to get visual Studio to show it in the Database Explorer after adding a connection to the ODBC Data Source Administrator in the Control Panel. Is there a way to get my database to show up in the Datebase Explorer without installing any drivers ... or is it, as an alternative, possible to use the dataset files (.xsd) and their simple design view when connecting to the database programmatically; adding the connectors dll file in the bin folder of my project and connect the old fashion way (if this is understandable) ... or do I simply have to realize that it's not possible... Does anyone have anything to say
multiple image fields in SQL table   (86 Views)
I have a table in SQL that has the fields e_id, productName, image1, image2, image3, image4 It's possible that only image1 and image 3 for example contain images and the other images are empty. I have an application that allows users to add images. The problem is that i am not sure how to write an update statement that will know into what fields to add the images without deleting the exisiting images. Can anyone please help
Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot\ProjectWebSite\Files\ROUTINE_MCA.xlsx'.   (164 Views)
everybody. I am in a critical situation. I first tried to make a project (file->new->project) using visual studio, where I displayed the content of a excel file by GridView. I was successful then, but when I attach it to my website located in inetpub I am getting this error : MicrosoftOfficeExcelcannotaccessthefile'C:\inetpub\wwwroot\ProjectWebSite\Files\ROUTINE_MCA.xlsx'.Thereareseveralpossiblereasons: Thefilenameorpathdoesnotexist. Thefileisbeingusedbyanotherprogram. Theworkbookyouaretryingtosavehasthesamenameasacurrentlyopenworkbook. At first I faced some COM related problem and found solution in Google, but this particular problem is not solving. Is there any way to access Excel document in website In my application there is a facility of uploading excel document to the server and then display its content. But I have failed to do this display operation, is there any turn around way, like store the excel document as dataset and then access it as required. Please help. I am in great trouble.
mySQL connector/net will work in development but not on   (120 Views)
hello, i got mySQL connector/net v6.0 to finally work on my development computer. I uploaded the asp/vb page to my webserver, along with an added assembly reference in my web.config and updated the bin folder on the webserver, however i am gettting the error 'MySqlCommand' is ambiguous in the namespace 'MySql.Data.MySqlClient'. anyone know how i can fix this my web.config looks like this
cannot access oracle throught SQL SOURCE   (146 Views)
I am trying to access Oracle 10g DB throught I have downloaded and isntalled ODP, In my code behind i have using Oracle.DataAccess.Client; I have a gridview and want to access data and allow it to be deleted/updated/selected. I was using System.Data.OracleClient, this would select data fine but when it comes to updating it wouldnt work, i keep getting the 'ORA-01036: illegal variable name/number error. I read up on a few baords which suggested using providerName="Oracle.DataAccess.Client", i have tried changing my connections in my web.config file from providerName="System.Data.OracleClient" to providerName="Oracle.DataAccess.Client", however when i add a SQLSOURCE to my aspx page,. it is not showing the web.config connections in my list. now i have addded Oracle.DataAccess.dll to my project in the Bin directory, it is also located on C:\oraclexe\app\oracle\product\10.2.0\server\BIN I am using VS 2005 and .net 2.0 am i missing something else
Excel Automation Reference Not Valid Error in PIVOT   (77 Views)
Hi all, I created a webpage using ASP .NET for Excel 2010 automation. I did the following Created one excel file with 2 sheets. Sheet1 - Data (Formatted as Table) Sheet2 - PIVOT (Refers the Table in Sheet1) I am populating the data in Sheet1 using Excel Objects and allowing the file to be downloadable by user. It opens up and shows the data perfectly and PIVOT also, but there is one problem, when the user refreshes or filters the PIVOT, it says reference not valid, Please let me know what to do to avoid this.
DB2 Connectivity   (142 Views)
I am not sure if this is the right section to post, but couldnt find any other section for DB2 connectivity for .NET. My problem is - I am connecting to DB2 through IBM DB2 provider , and the connection string goes like this: First problem is that DB2 connecitivy is very slow.. - I see a minimum connection time of 2 - 2 1/2 minutes. From next time, the DB2 connection is fast.. may be because i enabled connection pooling. But in case of connecting again as a result of postback, first connection is again taking 2-3 mins ( Doesnt connection pooling work after postback why ) Do we need to install any other tweak utilities to improve .NET to DB2 connectivity I am using VS .NET 2008 Please let me know how to configure, as my website is too slow because of this ;( Note: Even when I connect thru WinSQL its taking a bit of time..but not as much as from .NET app..
Trigger not firing   (72 Views)
DBA's I have created a trigger on update, insert and delete on a table to insert a row into an audit table. When in sql plus and I perform any insert,update and delete the trigger fires as required. When the update is performed from a web based application the trigger does not fire. Has anyone else out there experienced a similar problem If so what can I try to resolve the issue.
replication   (54 Views)
HI, Is it mandatory that the tables involved in replication should have one primary key.. Oracle Version is 8.1.6.
replace a word in a field   (80 Views)
i have an addr field with the sample data as follows. 123 Wall Street 1234 Main Street #201 3402 Dowling Street, Ste 200B i want to change all the word Street with st. How can i do that.
recreate indexes   (148 Views)
Sorry Instead of creating new thread I messed another thread This may be small question for Guru's . But I do have a question , Is there any advantage to recreate indexes with same extents and same size etc., and if I delete a row in a table will it be effected in index too Raghu
re: do not know why the script does not run ??   (289 Views)
hi! Guys , Heres the code .. ---------------------------------------------------------- declare type n_array is table of number index by binary_integer; type d_array is table of varchar2(10) index by binary_integer; cursor c1 is select empno,ename from emp; v_empno n_array; v_ename d_array; begin open c1; loop fetch c1 bulk collect into v_empno,v_ename; forall i in 1..v_empno.count update emp set sal = 0 where empno = v_empno(i); exit when c1%notfound; end loop; end ; / ----------------------------------------------------------- Here's my error message .. scott@ORACLE> @c:\ex.sql declare * ERROR at line 1: ORA-03113: end-of-file on communication channel ORA-24323: value not allowed Error accessing package DBMS_APPLICATION_INFO ERROR: ORA-03114: not connected to ORACLE scott@ORACLE> -------------------------------------------------------------- What is the problem and how can I fix it to run the program
Question on ASM   (78 Views)
I am having an issue with adding disks to a ASM diskgroup. We are using Oracle's 2-node clusterware. I had the UNIX folks create new disks (candidate) that needed to be added to the ASM diskgroup. I started adding the disks with the utility 'dbca'. On specifying to add disks I got the errors - ORA-15032 & ora-15075. I cancelled out of DBCA, not committing anything. But it looks othe disks became a member of the ASM group and is visible to only one of the nodes in the RAC environment. The issue was that the UNIX folks had not set the flag in the disks so they are not visible to both the nodes. Now, I am trying to drop the disks (as the redundancy is external) but I am not able to do so. ANy thoughts. Chintz
procedure   (66 Views)
HIIII,We have 2 different databases on different database m/cs. By using procedure,when user1 from m/c1 just he send a number 4,but this number on m/c2 when user2 execuite that procedure the count or number become double i.e 8. any one can help me.
Partition a table   (61 Views)
Dear all, I have an old and non-partitioned table with couple hundred millions of rows. Now we need to partition the table to increase performance. Is there a way that I can add partition to the table without recreating it I tried this and got error: alter table test add partition by range (DATE) (partition DEC04 values less than ('01-JAN-05'), partition JUN05 values less than ('01-JUL-05')); alter table test add partition by range (DATE) * ERROR at line 1: ORA-00902: invalid datatype I know that Oracle will allow me to add partitions to existing partitioned table, but what about a non-partitioned table
Oracle Warehouse Builder   (71 Views)
Will any body share your experience with oracle warehouse builder. SQL loader is better or warehouse builder is better.
Oracle Profile   (48 Views)
On unix machines in the Oracle user profile what does oracle_base, ld_library_path and path mean.
'IN operator' for dates in sql   (182 Views)
hi, Do anyone know how to use IN operator for date values I have 1 query as below, which I can put any date value to retrieve the data but when I execute I getORA-01843: not a valid month. select* fromtable wheretime_stampIN('02/28/2012','07/22/2012','09/29/2012') Sample result: Num Qty Time_stamp 1 2 02/28/2012 2 2 07/22/2012 3 2 09/29/2012 Any idea how to solve this Instead of using IN operator, is that others way
Assign dynamic query output to a variable   (154 Views)
Hi , I have a dynamic query like below. v_count_query := ' select count(feed_temp.*) FROM ' || v_feed_type_table || ' feed_temp'; v_count_query := v_count_query || ' WHERE ' || v_filters; Now the filters and the table name are user inputs, so this query has to be a dynamic query. Does anyone knows how can I get that count(feed_temp.*) to a local variable in the package Please help.
How to connect over ssl from website to Informix 3.5   (285 Views)
Setup: ASP.Net web application communicating with remote Informix DB (at the moment we are communicating over TCP and VPN but this has to change to SSL). We do not have root access to the server (shared or virtual host) I have a connection string of: "Database=****;Host=***.**.**.**;Server=*******_ssl;Service=9089;Protocol=onsocssl;UID=*******;Password=*******;". I have a self signed certificate so the website can communicate over SSL to the remote DB but I dont understand how/where to specify that the connection should use the certificate. I am getting a: ERROR [HY000] [Informix .NET provider][Informix]Secure Sockets Layer error: GSK_KEYRING_OPEN_ERROR-Keyring file did not open Any help would be good (preferably from someone who has done this kind of setup before). Also note that as I don't have root I cannot install certificates/sdks in the production environment.
Cursor as IN OUT Parameter (Oracle)   (222 Views)
I am having one stored procedure in Oracle. TYPE Type_Cursor IS REF CURSOR ; PROCEDURE proc_Test ( Test_CUR IN OUT pack_utility.Type_Cursor, Val IN NUMBER) and In my front end, i have put the following code to execute the SP, OracleCommand cmd = new OracleCommand("Proc_Test",con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("Test_CUR",OracleType.Cursor).Direction = ParameterDirection.InputOutput; cmd.Parameters.Add("Val",OracleType.Number).Value = 1; OracleDataAdapter ad = new OracleDataAdapter(cmd); DataSet ds = new DataSet(); ad.Fill(ds); While executing the Form, the triggers an error like, "parameter 'Test_CUR': OracleType.Cursor parameters may only be ParameterDirection.Output parameters." Pls guide me to solve this.
SqlDataSource Issue On Oracle 64 bit ?   (56 Views)
I have an web application targeting .Net2.0 and my databse is oracle, I used SqlDataSource Control to communicate with oracle database its working fine on my development server, but on my production Oracle is 64 bit so im getting an error like " " i tried with Int64 also but still im getting the same error following is the markup of sqldatasource i used
How do I export gridview data to an Excel file from a Content page ?   (104 Views)
Hi; I am trying to export a grdview toanExcel file but I am getting this error and i suspect the error has something to do with the fact that the code is on a CONTENT page and not web page: System.InvalidOperationExceptionwasunhandledbyusercode Message="RegisterForEventValidationcanonlybecalledduringRender();" Source="System.Web" StackTrace: atSystem.Web.UI.ClientScriptManager.RegisterForEventValidation(StringuniqueId,Stringargument) atSystem.Web.UI.ClientScriptManager.RegisterForEventValidation(PostBackOptionsoptions) atSystem.Web.UI.ClientScriptManager.GetPostBackEventReference(PostBackOptionsoptions,BooleanregisterForEventValidation) atSystem.Web.UI.WebControls.LinkButton.AddAttributesToRender(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.Render(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.DataControlLinkButton.Render(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderControlInternal(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterwriter,ICollectionchildren) atSystem.Web.UI.Control.RenderChildren(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.Render(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderControlInternal(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterwriter,ICollectionchildren) atSystem.Web.UI.Control.RenderChildren(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.Render(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderControlInternal(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.Table.RenderContents(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.Render(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderControlInternal(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterwriter,ICollectionchildren) atSystem.Web.UI.Control.RenderChildren(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriterwriter) atSystem.Web.UI.WebControls.GridView.Render(HtmlTextWriterwriter,BooleanrenderPanel) atSystem.Web.UI.WebControls.GridView.Render(HtmlTextWriterwriter) atSystem.Web.UI.Control.RenderControlInternal(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter,ControlAdapteradapter) atSystem.Web.UI.Control.RenderControl(HtmlTextWriterwriter) atUnReportedChecks.LinkButton2_Click(Objectsender,EventArgse)inC:\DocumentsandSettings\k4gp5\MyDocuments\VisualStudio2005\WebSites\Apecs_TrustCheckEscheatment\UnReportedChecks.aspx.vb:line60 atSystem.Web.UI.WebControls.LinkButton.OnClick(EventArgse) atSystem.Web.UI.WebControls.LinkButton.RaisePostBackEvent(StringeventArgument) atSystem.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(StringeventArgument) atSystem.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandlersourceControl,StringeventArgument) atSystem.Web.UI.Page.RaisePostBackEvent(NameValueCollectionpostData) atSystem.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint) Here is my export code: Response.Clear() Response.AddHeader("content-disposition", "attachment;filename=FileName.xls") Response.Charset = "" Response.ContentType = "application/vnd.xls" Dim stringWrite As New System.IO.StringWriter() Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite) GridView1.RenderControl(htmlWrite) Response.Write(stringWrite.ToString()) Response.End() So I trying adding this code to avoid theerror but this has a problem with a content page: Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As Control) 'Me.VerifyRenderingInServerForm(control) ' this code need to be disabled End Sub If I use a Master page/ Cpmtent page how do I avoid this error
Saving textbox data to MySql database in   (118 Views)
Hi dear coders though a very simple question to ask, but please tell me how to save and retrieve data in/from my textboxes to/from database (MYSQL) on submit button click. i know its a very simple task but i cant make it done, so i request you to please send me some working example link or post any helpful code here in i will be highly
The 'Microsoft.OLEDB.4.0' provider is not registered on the local machine   (286 Views)
protected void Page_Load(object sender, EventArgs e) { try { string con = @"Provider=Microsoft.OLEDB.4.0;" + @"DataSource=C:\Users\Sairam\Desktop\mysheet.xls" + "Extended Properties=Excel 8.0"; OleDbConnection conn = new OleDbConnection(con); OleDbDataAdapter da = new OleDbDataAdapter("select * from [1$]", conn); DataSet ds = new DataSet(); da.Fill(ds); } catch (Exception) { throw; } } I am trying to populate data form excel sheet to gridview, I am getting this error: The 'Microsoft.OLEDB.4.0' provider is not registered on the local machine Here is my code. I am uisng vs2005 Vista O/S office 2003 protected void Page_Load(object sender, EventArgs e) { try { string con = @"Provider=Microsoft.OLEDB.4.0;" + @"DataSource=C:\Users\Sairam\Desktop\mysheet.xls" + "Extended Properties=Excel 8.0"; OleDbConnection conn = new OleDbConnection(con); OleDbDataAdapter da = new OleDbDataAdapter("select * from [1$]", conn); DataSet ds = new DataSet(); da.Fill(ds); } catch (Exception) { throw; } } What might be the problem
ASP.Net can use MySQL as Database?   (137 Views)
Does MySQL Support to ASP.Net for a databse to replace MS SQL Server
insert and select data   (83 Views)
hi i am using visual studio and sql server 2005 with language C#. my requirement in project is to select data from another database and insert data into database - which is in MySQL. i need help how i can do by using C# and related technologies.
Excel - Format of the initialization string does not conform to specification starting at index...   (316 Views)
... I'm trying to retreive info from a Excel file (Office XP) but I keep getting the same ERROR over and over again.I cant seem to get the connectionString to GET the Excel file. The ERROR is: Format of the initialization string does not conform to specification starting at index 48... Here's my code: public static List GetInfo() { string filename = "@C:\File.xls"; string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+filename+";Extended Properties=Excel 9.0;"; DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb"); List returnList = new List(); using (DbConnection connection = factory.CreateConnection()) { connection.ConnectionString = connectionString; //Here's where the ERROR occurs using (DbCommand command = connection.CreateCommand()) { .......... .......... .......... I've searched the net, i've been at this for hours, i'm loosing my pacience [:P] I've seen that this error has occured to a lot of people but their solutions haven't helped at all [:^)] Can someone please help me out
OracleCommand Object with stored procedure in Oracle 10.2 (ODP.Net)   (128 Views)
! i am using the oracle command with oracle database (v 10.2), the command object has some parameters, some of them are of type input and 2 of them are of type Out put. But when we execute the command the output parameter of the command object shows the null value. i do not know wot is the exact problem. here is the code Private Sub PrepareInTransitCommand(ByRef pCancelCompleteLog As DA.Common.CancelCompleteLog, _ ByRef pCommand As OracleCommand) With pCommand 'Attatches the Parameters .Parameters.Add(New OracleParameter("p_business_unit_id", OracleDbType.Varchar2, 2, ParameterDirection.Input)) .Parameters.Add(New OracleParameter("p_division_id", OracleDbType.Varchar2, 5, ParameterDirection.Input)) .Parameters.Add(New OracleParameter("p_last_receipt_date", OracleDbType.Date, 7, ParameterDirection.Input)) .Parameters.Add(New OracleParameter("p_comp_prcnt", OracleDbType.Single, ParameterDirection.Input)) .Parameters.Add(New OracleParameter("p_it_number", OracleDbType.Double, ParameterDirection.Input)) .Parameters.Add(New OracleParameter("p_cancel_complete_ind", OracleDbType.Varchar2, 1, ParameterDirection.Input)) .Parameters.Add(New OracleParameter("p_transaction_id", OracleDbType.Int64, ParameterDirection.Output)) .Parameters.Add(New OracleParameter("p_return_status", OracleDbType.Int64, ParameterDirection.Output)) .Parameters.Add(New OracleParameter("p_error_msg", OracleDbType.Varchar2, 2000, ParameterDirection.Output)) 'Sets Values .Parameters.Item("p_business_unit_id").Value = pCancelCompleteLog.BusinessUnitId .Parameters.Item("p_division_id").Value = pCancelCompleteLog.DivisionId End With End Sub ' Now Excecute command public sub Main () Call PrepareInTransitCommand(pCancelCompleteLog, lCmd) lCmd.ExecuteReader() ' Check the Return Value which works fine here If Not lCmd.Parameters.Item("p_return_status").Status = 0 Then 'Do Some thing End If but the Below parameter throws null, where as i checked the stored procedure which works fine. no problem in procedure lCmd.Parameters.Item("p_transaction_id") End Sub kindly tell me any body if some body have same issue in Oracle.
how to create tables in a specified tablespace   (79 Views)
hi i'm new to oracle 10g can any one tell me how to create tables in a specified tablespaces
Problem while inserting data via table adapter   (93 Views)
Hi all, I created an dataset as given in the tutorial "creating a data access layer" I created an Insert query but when I am trying to run the query it is inserting all null values in my table. Can any one help me regarding this InsertQuery = INSERT INTO link (Id, yearofcalendar, pdflink, wordlink) VALUES (Id, yearofcalendar, pdflink, wordlink) with paramenters id,yearofcalendar,pdflink and wordlink I created an insertquery with the tableadapter query configuration wizard and wrote the following code for inserting the query... Try Dim adap As New DetailsTableAdapters.DataTable1TableAdapter Dim insertstring As Details.DataTable1DataTable insertstring = adap.InsertQuery("2", "2008", "ramesh", "rathi") Catch ex As Exception MsgBox(ex.Message) End Try Many
Urgent -- How should i tackle this error   (142 Views)
I am trying to open a excel spread sheet from a particular location but i am getting this error System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data. How shoud i by pass it. this is my codelocation=Server.MapPath("pdf/client/"&strFilePath) location1=Server.MapPath("\\FiServ\pdf\client\"&strFilePath) ElseIf(FlPlanDetails.PostedFile.FileName.ToLower.EndsWith(".xls")OrFlPlanDetails.PostedFile.FileName.ToLower.EndsWith(".xlsx")OrFlPlanDetails.Value="")Then FlPlanDetails.PostedFile.SaveAs(location) DimexcelConnectionStringAsString="Provider=Microsoft.Jet.OLEDB.4.0;DataSource=location1;ExtendedProperties=Excel8.0" 'CreateConnectiontoExcelWorkbook UsingconnectionAsData.OleDb.OleDbConnection=NewData.OleDb.OleDbConnection(excelConnectionString) DimcommandAsData.OleDb.OleDbCommand=NewData.OleDb.OleDbCommand("SelectCusip,Fundnofeeclass,FundNamewfeeclass,FundDescriptionFROM[Sheet1$]",connection) connection.Open() 'CreateDbDataReadertoDataWorksheet UsingdrAsData.Common.DbDataReader=command.ExecuteReader() 'SQLServerConnectionString DimsqlConnectionStringAsString=System.Configuration.ConfigurationManager.AppSettings(APPSETTING_DBCONNECTION)'"DataSource=.; InitialCatalog=Test;IntegratedSecurity=True" 'BulkCopytoSQLServer UsingbulkCopyAsSqlBulkCopy=NewSqlBulkCopy(sqlConnectionString) bulkCopy.DestinationTableName="Fund" bulkCopy.WriteToServer(dr) EndUsing EndUsing connection.Close() EndUsing I am getting the error message at connection.Open().
Oracle unsupported datatype question   (291 Views)
Hi - Yesterday my queries were working fine, last night the DBA's added a new column without telling anyone - this new column is of a type ST_GEOMETRY This new additional column is killing my queries. Here is how its been implemented.... sqlQuery = "SELECT * FROM lrcreator.politicalbasins ORDER BY BASINNAME"; xx = cs.GetLandACQConnectionString(); DS = new DataSet(); OConn = new OracleConnection(xx); ODA = new OracleDataAdapter(sqlQuery, OConn); ODA.MissingSchemaAction = MissingSchemaAction.AddWithKey; ODA.Fill(DS, "ALL_BASINS"); OConn.Close(); The procedure fails on the ODA.Fill statement it fails with an Unsupported Datatype error does anyone know how to get around this error
Firebird and commit   (110 Views)
I have connected to Firebird over ODBC and have on WebForm GridView1 and SqlDataSource1 and enabled editing and delete-ing. also, I filled the UPDATE, INSERT and DELETE SQL statements. Problem is that data is not COMMITed to database. after clicing update etc. where or how to call SQL COMMIT command in ASP.NET2.0
ORA-12154: TNS:could not resolve service name   (205 Views)
all, I am very new to Oracle and I keep getting this error in .Net and I don't know why... I am using Oracle 8.1.7, C# andusing System.Data.OracleClient I selected OracleDataAdaptor from the toolbox and created a new connection and tested it and it was successful. I built my program and there are no errors but when the page loads I get the error mentioned in the subject heading. It says the error occurs at conn.Open(); Does anyone know how to go about and try to fix this error By the way here is that section of code: protected System.Data.OracleClient.OracleDataAdapter oracleDataAdapter1; protected System.Data.OracleClient.OracleCommand oracleSelectCommand1; // Selects all the columns in the db protected System.Data.OracleClient.OracleCommand oracleInsertCommand1; protected System.Data.OracleClient.OracleConnection conn; // Tested connection and it worked protected System.Web.UI.WebControls.ListBox nameListBox; private void Page_Load(object sender, System.EventArgs e) { using(conn) using(oracleSelectCommand1) { oracleSelectCommand1.Connection = conn; conn.Open(); OracleDataReader reader = oracleSelectCommand1.ExecuteReader(); while(reader.Read()) nameListBox.Items.Add(new ListItem(reader.GetString(0))); reader.Close(); }
Problems connecting to database using Web Matrix   (116 Views)
How do I connect to a Foxpro .dbf using the Simple Data Report in Web Matrix The following code works in Foxpro: STORE SQLCONNECT('vfpdbf', 'sa') TO gnConnHandle SELECT Firstname, Lastname, Address, City, State ; FROM 'CUSTOMERS' ; WHERE trim(upper(lastname)) = trim(upper('M'))
1 Dimensional Array   (111 Views)
I have tried to create an add entry form for a page made with (VB) and MYSQL. I have managed to get something working with edit / delete, but when I try and add an entry with this page I get the following error. CompilerErrorMessage:BC30311:Valueoftype'System.Data.Odbc.OdbcCommand'cannotbeconvertedto'1-dimensionalarrayofSystem.Data.Odbc.OdbcCommand'. SourceError: Line12: strInsert="InsertIntoservers_test(client_name,gateway,connection_type,hostname,server,login,password,connection_bis,market,software,node,description,comments,enable)"&_ Line13: "Values(@ClientName,@Gateway,@ConnectionType,@Hostname,@Server,@Login,@Password,@ConnectionBis,@Market,@Software,@Node,@Description,@Comments,@Enable)" Line14: cmdInsert=NewODBCCommand(strInsert,MyConn) Line15: cmdInsert.Parameters.Add("@ClientName",txtClientname.Text) Line16: cmdInsert.Parameters.Add("@Gateway",txtGateway.Text) Any idea's Here is the complete code: Sub Button_Click (obj As Object, e As EventArgs) Dim connectionString As String = "Driver={MySQL ODBC 3.51 Driver};SERVER=*;UID=*;PWD=*;DATABASE=*;" Dim MyConn As New OdbcConnection(connectionString) Dim strInsert As String Dim cmdInsert As OdbcCommand() strInsert = "Insert servers_test ( client_name, gateway, connection_type, hostname, server, login, password, connection_bis, market, software, node, description, comments, enable ) " & _ "Values ( @ClientName, @Gateway, @ConnectionType, @Hostname, @Server, @Login, @Password, @ConnectionBis, @Market, @Software, @Node, @Description, @Comments, @Enable )" cmdInsert = New ODBCCommand( strInsert, MyConn ) cmdInsert.Parameters.Add( "@ClientName", txtClientname.Text ) cmdInsert.Parameters.Add( "@Gateway", txtGateway.Text ) cmdInsert.Parameters.Add( "@ConnectionType", txtConnectionType.Text) cmdInsert.Parameters.Add( "@Hostname", txtHostname.Text ) cmdInsert.Parameters.Add( "@Server", txtServer.Text ) cmdInsert.Parameters.Add( "@Login", txtLogin.Text ) cmdInsert.Parameters.Add( "@Password", txtPassword.Text ) cmdInsert.Parameters.Add( "@ConnectionBis", txtConnectionbis.Text ) cmdInsert.Parameters.Add( "@Market", txtMarket.Text ) cmdInsert.Parameters.Add( "@Software", txtSoftware.Text ) cmdInsert.Parameters.Add( "@Node", txtNode.Text ) cmdInsert.Parameters.Add( "@Description", txtDescription.Text ) cmdInsert.Parameters.Add( "@Comments", txtComments.Text ) cmdInsert.Parameters.Add( "@Enable", txtEnable.Text ) MyConn.Open() cmdInsert.ExecuteNonQuery() MyConn.Close() End Sub Client Name Gateway Connection Type Hostname Server Login Password Connection Bis Market Software Node Environment Mode Description Comments Enable
Oracle 10g with MS ODP   (93 Views)
Just wondering if anyone has tried using Oracle 10g with MS ODP. Is it compatible
iskey = false when i use cmd.ExecuteReader(CommandBehavior.keyinfo) mysql myoledb provider   (144 Views)
************* Edited by moderator Adec *************** Inserted missing < code> tags. Always format your code and use tags when including code in your postings. Many readers disregard postings without the code tags. ************************************************** , I am trying to find the name of the keyfield of a table in mysql. (visual studio 2003 en iis5.0 en een web pagina i am using the myoledb provider versie 3.0 for mysql (not the bytefx because i want to keep all my oledb commands i wrote already) I use myreader = cmd.ExecuteReader(CommandBehavior.SchemaOnly Or CommandBehavior.KeyInfo) and show all info in a grid. I notice that de "iskey" property is always set to False (even of all the field , included the actual key field) I use Provider=MySqlProv.3.0 (Because it is a mysql database accessed through oledb) In de mysql console the field "ID" of the table is marked with the 'key' icon and even autoincrement is turned on .But it remains "iskey" = false What could be the problem Is there another way to find the name of the keyfield of a table
Re: Crystal Reports using Oracle   (153 Views)
i have been using oracle database for my program for development and everything (commands... connections...) works fine in my classes the problem is, when i try to create a crystal report using the wizard, the connection is valid and i can get the data to display on the rpt during development, but when i run it, the page returns me a error : Server Error in '/ium' Application. -------------------------------------------------------------------------------- Logon failed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [LogOnException: Logon failed.] .F(String  , EngineExceptionErrorID  ) .A(Int16 , Int32 ) .@(Int16 ) CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) CrystalDecisions.Web.ReportAgent.u(Boolean N) CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) System.Web.UI.Control.PreRenderRecursiveInternal() System.Web.UI.Control.PreRenderRecursiveInternal() System.Web.UI.Control.PreRenderRecursiveInternal() System.Web.UI.Page.ProcessRequestMain() -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 in that page there's only 1 line binding the report source to the viewer: crystalreportviewer1.reportsource = ".\RoCryRpt1.rpt" any solutions
PL/SQL PROCEDURE using Cursor Loops and SINGLE PARAMETER   (125 Views)