.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

oracle not working insert update and search

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net

 here is my code where im doing mistake

here is my class1 code

Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.OracleClient
Public Class Class1
Public Shared conn As New OracleClient.OracleConnection(ConfigurationManager.ConnectionStrings("MOH_String").ConnectionString)
    Public Shared cmd As New OracleCommand
    Public Shared da As New OracleDataAdapter(cmd)
    Public Shared pr As New Parameter
    Public Shared dr As OracleDataReader

    Public Shared Function GetData(ByVal strQuery As String) As DataTable
        Dim dt As New DataTable
        Dim cmd As New OracleCommand(strQuery, conn)
        cmd.CommandType = CommandType.Text
            da.SelectCommand = cmd
        Catch ex As Exception
            Return dt
        End Try
        Return dt
    End Function

 Public Shared Function SpInsertUpdateDelete(ByVal SpName As String, ByVal cmd As OracleCommand) As DataTable
        cmd.CommandText = SpName
        cmd.Connection = conn
        cmd.CommandType = CommandType.StoredProcedure

        Catch ex As Exception
            Return No

View Complete Post

More Related Resource Links

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


Sharepoint 2007 Search Not Working


I am pulling my hair out guys. I have tried everything i could find from this site and all other sites but have not been successful. No matter what i do I cannot get the search to work. We are using SharePoint 2007 and the search had been fine but our security team performed some patches and now I’m stuck with a dead search feature.

Any help would be immensely appreciated.

Things I have tried but did not resolve the problem:

1. Check all accounts and passwords

2. Run the SharePoint Products and Technologies Configuration Wizard

3. Reboot server reset IIS

4. Try to rebuild the index but that also fails

5. Check the Content Access Account

Office Sharepoint Server Search not working but Windows Server Search is.

I am having an annoying Issue with the Sharepoint 2007 Enterprise search functionality. I cannot get the Search Centre to work, the out of the box webparts crash the page except the Searchbox when the others are closed. The event viewer shows up numerous Errors (Office Sharepoint Server - EventID 7080) returns with and the same when trying to add a search related web part (e.g. core.results, federated etc). EventID 6398 - Timer is a regular as is 7080. Details below.

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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).

Remote connections are connected, I am not 100% on the Instance name, (how would I go about checking this?)

Also I cannot access the link to SharedServices1 - Open Shared Services Admin site (not clickable), guess it's permissions but I seem to have full site permissions, I think I need SSP-Admin to make more edits to the Search, maybe this is related :s

Both Search Servers are runnig, I have tried everything I can think of to fix this and allow the Search Centre to work.

I am running Sharepoint 2007 on SQL Server 2008.

SharePoint Designer: insert custom list not working anymore



Suddenly sharepoint designer decided today that it doesn't want to insert a custom list form anymore...
To be more specific, it doesn't work anymore in a site that uses the Microsoft budgeting and tracking template. In a website that uses an out of the box template, it still works.

It did work before, because I did it in other websites using the same template (it's broken there as well now).

Why oh why does SharePoint refuse to do this now?
I searched google and here on the forums, but all I could find was some issues after installing SP1, but we did that already long time ago and it was still working after that. I checked with our infrastructure guys and they didn't install new updates they say.

I also tried the solutions listed here: http://blogs.msdn.com/spdsupport/archive/2008/07/03/how-to-fix-custom-list-forms-will-not-insert-or-show-up-on-the-design-surface-of-sharepoint-designer.aspx
But they don't fix the problem.

So my problem is, I can go to Insert > SharePoint Controls > Custom List Form
I pick my list, content type and form type, I hit OK and... nothing happens.

Insert/Update OLE Attachment(Binary datatype) using SQL server 2000

Hi All, In the same senario how we can Insert/Update OLE Attachment(Binary datatype)  from one source table to other destination table by using SQL Server 2000 not with C# fronend code. Appreciated if you can give fix on this regads, Divakar.

SharePoint Search not working on one site collection

I am running into some weird behavior with how SharePoint is crawling site/list data.  Let's say our main intranet site is http://www.intranet.com: Most of our older sites are setup with URLs like http://www.intranet.com/sites/sitename .  Crawling is working fine on these sites and I can execute a search and find all of the results I would expect.  At some point recently (before I joined this firm), they made a decision that all new sites would have the URL http://www.intranet.com/SiteDirectory/sitename .  Any sites which fall into this bucket are not being crawled, it would seem. If I check Central Adman>Shared Services>Search Administration, I can see that the first content source being crawled is http://www.intranet.com so I would imagine this crawl should pick up anything under /SiteDirectory/ but it is not.  I also checked the Crawl Settings on this page and it is set to "Crawl everything under the hostname for each start address".  Lastly, I see that there were only 21 errors in the last full crawl but none of these errors apply to a /SiteDirectory/ site. In short, what could be causing the crawl to apparently skip all of the sites within /SiteDirectory/ and how can this best be fixed?

Allow or deny roles to update, insert and delete records.

Hello, I have two roles "Admin" and "Basic". I also have a listview on the web page. My goal is that to make "Admin" role has the highest privilege to deal with records such as "insert", "update" and "delete". For the role "Basic", it only can update the records. Is there any sample code for that? Thanks.  

update/insert parent child at the same time

Hi Al, Is there a way to create a contact form that takes the name. address and other info for the master record; Then, somehow, on the same page, allow the user to enter multiple contact info as chid records (i.e. phone, email, etc.) All this using the Objec DataSource or SQL DataSource (which ever is easy) and doesn't require writing too much code. Any reference material welcomed. Thanks, rod.

Possible to insert & update in formview?

I have a formview where DefaultMode="Insert". Underneath, I have a gridview that displays the information from the inserts. Is there a way to update the information as well as insert? Maybe there is a better way to do what I'm trying to do. Any help is appreciated. Thanks!

Possible to update and insert from formview?

I have a formview where DefaultMode="Insert". Underneath, I have a gridview that displays the information from the inserts. Is there a way to update the information as well as insert? Maybe there is a better way to do what I'm trying to do. Any help is appreciated. Thanks!

Sharepoint Search and Secure Store Service not working

Hi There I am having issues with a few Sharepoint Services When I try to search for a document on any SharePoint site, I recieve an "Internal Server Error Exception". However when I checked the log files, I couldn't find any error messages matching with the given correlation ID. The search was working 2-3 weeks ago. Also 2 weeks ago, I started receiving warnings in the Health Analyzer saying “The Security token service is not available”. I am wondering if the security token service breaking down is related to the search issues, and if so what suggestions I could try to fix this issue. I am also unable to access the secure store service. In Central Administration->Application Management->Manage Service Applications, I try to click on the Secure Store Service, but there is no Proxy attached to the service, and I receive a message “No Secure Store Service Application Proxy ID was found”. When I check the Logfile, I receive these errors: 08/10/2010 11:11:32.94               w3wp.exe (0x18E4)                                      0x0ADC SharePoint Foundation     &nb

jquery is not working in asp.net panel and/or update panel ? need help

I have 3 panels on single .aspx page and depending on condition required panel is displayed . Default panel is panel 1 .  I have created a image gallery which displays thumbnails of various images and when I hover on that image its preview is displayed. I have put the code for this image gallery in 2nd panel, it displays thumbnails but on hover preview is not displayed. but  if I somehow make postback then it works. And I place the same code in !st panel it works ? Can anyone tell me whats wrong with my code? Regards, anas anjaria I have 3 panels on single .aspx page and depending on condition required panel is displayed . Default panel is panel 1 . I have created a image gallery which displays thumbnails of various images and when I hover on that image its preview is displayed.I have put the code for this image gallery in 2nd panel, it displays thumbnails but on hover preview is not displayed. but  if I somehow make postback then it works.<div> /* PAnel 1*/ <asp:UpdatePanel ID="updpnl2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Panel ID="pnl2" runat="server" Visible="false"> /*other coding stuff*/ <div id="wrap"> <div id="styles-table"> <div id="styles-wrap"&g

Concurrent INSERT and UPDATE

I created a table with the following columns in SQL server 2008 express version,   create table action (id int identity , comment varchar(256), description varchar(max), opendate date, closedate date) I was trying to verify whether inserts will slow down once the table has large number of records. Hence i started inserting in loop (30 times) 10000 records. This was done using Microsoft jdbc driver ver 4.0. The time taken was almost in the range 8-10 seconds. In between i also tried to update the 'description' column for all the rows from sql client window. This affected the insert operations and it took 31 seconds for inserting one set of 10,000 rows. Please suggest how to handle such scenarios. Is the slowness because of the entire table update?

MS Filter pack for Zip files content search not working

I am facing a problem related to Zip files content search. Searching of content inside zip files doesn't return in search results. But searching for zip file name returns filename in search results. I look into Crawler log, all it says is:   Steps I followed to install MS Filter pack: Installed MS Filter Pack 1.0 (x64) http://support.microsoft.com/kb/946336/en-gb In Search Administration page added "zip" in File types Add Reg subkey under : "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\" for ".zip" with value ={20E823C2-62F3-4638-96BD-90F4F6784EBC} Stop and Start oSearch Run full crawl of content sources Can you please advise or have any tips you got to resolve this. Thanks http://portal/testzip.zip Crawled (The filtering process could not load the item. This is possibly caused by an unrecognized item format or item corruption. )

SharePoint 2010 Claims Based Authenticaton site working but search is broken

Hi, I have SP 2010 sucessfully installed on a Windows 2008 R2 server with SQL Server 2008 R2.  I created local machine accounts for the following: MACHINE\mssqlservice MACHINE\sp_admin MACHINE\sp_search MACHINE\sp_farms I have setup 2 sites with public facing internet access as well as local sites. I have CBA working properly on both sites from both public and private access. My problem is that when I go to search, I am constantly redirected to an error page. I have checked all SP services on the server and they are all running as MACHINE\mssqlservice That account has proper access to all sites as well as all DB's. My search is crawling and I get one error from a long named PDF file in my site, which is OK.   My questions is if my CBA is working fine and my search is crawling, why I am not getting a results page when I search from the sites:   Here is the error I get:   Error Internal server error exception:   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 5a03b730-42c2-48c9-a220-3b9d052481de Date and Time: 9/9/2010 4:45:07 PM   I am kind of stuck at this point and am not sure how to proceed.  Any help would be appreciated.        --TR

EntityDataSource Insert, Update, and ConvertEmptyStringToNull

I've noticed that when using an EntityDataSource with FormViews, GridViews, and other databound controls, that empty strings are not always converted to null for inserts and updates. This isn't an issue when using templated DynamicControls, but when normal WebControls are bound to the datasource. For example: <asp:TextBox ... Text='<%# Bind("NullableColumnName") %>'  During inserts and updates, when the text box has an empty string, the value saved to the table cell in the db is an empty string rather than NULL. This is avoidable if normal <asp:Parameter Name="NullableColumnName" Type="String" /> parameters are added to the InsertParameters and UpdateParameters collections, since the default property of ConvertEmptyStringToNull is true. Is there another way to ensure empty strings get converted to null, other than using DynamicControls with EDS? I'm just curious what is happening behind the scenes here. Data values of type Int32 are automatically converted to null when they are bound to an empty string, as are datetime values. It only seems to be normal strings that get pushed to the EDM without conversion to null. Any explanations?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend