Problem Using SelectParameters With Oracle Queries

Oct 24, 2006

Hi,
I have a GridView which is bound to a SqlDataSource that connects to Oracle. Here's the code:
 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:OracleConnectionString %>"
ProviderName="<%$ ConnectionStrings:OracleConnectionString.ProviderName %>" SelectCommand="SELECT QUIZ.TITLE FROM QUIZ WHERE (QUIZ.USERNAME = @UserName)">

<SelectParameters>
<asp:SessionParameter Name="UserName" SessionField="currentUser" Type="String" />
</SelectParameters>

</asp:SqlDataSource> 
As you can see I'm trying to pass the value of the "currentUser" session variable to the query. I get an error message "ORA-xxx Illegal name/variable". Where am I going wrong? I tested the connection by placing a specific value instead of the "@UserName" and it worked. 

View 1 Replies


ADVERTISEMENT

Oracle Parameterized Queries To Update Oracle Table Do Not Work

Apr 23, 2007

Oracle and MS drivers do not support parameterized queries, so update table set column=? where primarykey=? does not work for Oracle.



Anyone knows how to update an Oracle table through SSIS?



Thanks!

Wenbiao

View 5 Replies View Related

Get A Value From A Record Using SelectParameters

Feb 10, 2008

Hi there!Basicly I only want to retrieve the value of the field "FirstTime" from a record as shown below:1
2 Dim ProdUserID As String = "samurai"
3
4 Dim LoginSource As New SqlDataSource()
5
6 LoginSource.ConnectionString = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString1").ToString()
7
8 LoginSource.SelectCommandType = SqlDataSourceCommandType.Text
9 LoginSource.SelectCommand = "SELECT FROM aspnet_Users (FirstTime) VALUES (@FirstTime) WHERE UserName=@ProdUserID"
10
11 Dim SeExiste As Boolean = LoginSource.SelectParameters.GetValues("@FirstTime")
12
 This is the error reported:Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30455: Argument not specified for parameter 'control' of 'Public Function GetValues(context As System.Web.HttpContext, control As System.Web.UI.Control) As System.Collections.Specialized.IOrderedDictionary'.  Please can you answer in the same logical schema? I'm a newbie so if you may, describe the process step by step. It would be easier for me to understand.Thanks in advance.  

View 1 Replies View Related

What Am I Forgetting In SelectParameters?

Mar 10, 2008

What am I forgetting to do?  I am setting the SELECT parameter 'techcode' in the code behind trying to paqss it as the ZWOP in my SQL Select statement but it is not getting to the SQl SelectParameters statement.  Do I need to place a TextBox control on the ASPX page to hold it?
ERROR: Exception Details: System.InvalidOperationException: Could not find control 'techcode' in ControlParameter 'ZWOP'.
CODE BEHINDint techcode;protected void Page_Load(object sender, EventArgs e){    techcode = 11;    }
ASPX CODE. . . SelectCommand="SELECT [ZL_ID], [complete], [error], [Zip], [ZipCity], [ZipState], [ZWOP] FROM ZipData WHERE ([complete] = 0 OR [complete] IS NULL ) AND [ZWOP] = @techcode ORDER BY Zip" <SelectParameters> <asp:ControlParameter ControlID="techcode" Name="ZWOP" PropertyName="SelectedValue" Type="Int16" /> </SelectParameters>

View 8 Replies View Related

SelectParameters - If Checked Add Where

Apr 3, 2008

What im looking to do is put a checkbox on my page and if the box is checked have it add a where clause to the sql statement.
The most i have seen with selectparameters is for it to basically take the value of the given control (or whatever) and dump it in to a query.
In this case what i would like to do is if the box is not checked it has my basic query run Select * from Table
and if the box is checked i would like it to run Select * from table where status='completed'
basically a check box that shows only completed items.
wasnt sure if i could do this with just the sqldatasource control and some selectparameters or if i had to write some code.
 Thanks
Justin

View 5 Replies View Related

SQL Datasource And SelectParameters ALL Items

Oct 24, 2006

Hi , I am trying to write a report generator by simply using a form and then a gridview that query's the database based on what the user selects on the form.  Anyways, I update the SQL parameters similar to below code.  I just want to know how i can tell the parameter to get ALL values from the parameter instead of a specific value. For example if the user wanted to see ALL the records for CustomerName what would i set the parameter default value to?  I tried the asterisk but that did not work.  Please guide me....Thanks!  MattSqlDataSource1.SelectParameters["CustomerName"].DefaultValue = "some value";<asp:SqlDataSource ... >   <SelectParameters>      <asp:Parameter Name="CustomerName" />   </SelectParameters></asp:SqlDataSource>

View 1 Replies View Related

How To Setup SelectParameters Programmatically?

Feb 16, 2007

Hi,
I am using Visual Web Developer 2005 Express Edition.
I am trying to SELECT three information fields from a table when the Page_Load take place (so I select the info on the fly). The refering page, sends the spesific record id as "Articleid", that looks typically like this: "http://localhost:1424/BelaBela/accom_Contents.aspx?Articleid=2". I need to extract the "Article=2" so that I can access record 2 (in this example).
How do I define the SelectParameters or QueryStingField on the fly so that I can define the WHERE part of my query (see code below). If I remove the WHERE portion, then it works, but it seem to return the very last record in the database, and if I include it, then I get an error "Must declare the scalar variable @resortid". How do I programatically set it up so that @resortid contains the value that is associated with "Articleid"?
My code is below.
Thank you for your advise!
RegardsJan/*******************************************************************************
* RETRIEVE INFORMATION FROM DATABASE
*******************************************************************************/
// specify the data source
string connContStr = ConfigurationManager.ConnectionStrings["tourism_connect1"].ConnectionString;
SqlConnection myConn = new SqlConnection(connContStr);

// define the command query
String query = "SELECT resortid, TourismGrading, resortHits FROM Resorts WHERE ([resortid] = @resortid)";
SqlCommand myCommand = new SqlCommand(query, myConn);

// open the connection and instantiate a datareader
myConn.Open();
SqlDataReader myReader = myCommand.ExecuteReader();

// loop thru the reader
while (myReader.Read())
{
Label5.Text = myReader.GetInt32(0).ToString();
Label6.Text = myReader.GetInt32(1).ToString();
Label7.Text = myReader.GetInt32(2).ToString();
}

// close the reader and the connection
myReader.Close();
myConn.Close(); 

View 3 Replies View Related

How To Specify 2 Different Selectparameters - 1 For Querystringparameter And 1 For Controlparameter

Apr 4, 2007

Hello,
I am sure there is a way to do this programmatically, but it is just not sinking in yet on how to go about this.  I have a page where I use a dropdownlist that goes into a gridview and then the selected item of the gridview into the detailsview (typical explain seen online).  So, when selecting from the dropdownlist, the gridview uses a controlparameter for the selectparameter to display the appropriate data in the gridview (and so on for the detailslist). 
My question is - I wanted to use this same page when coming in from a different page that would utilize querystring.  So, the parameter in the querystring would be for what to filter on in the gridview, so the dropdownlist (and that associated controlparameter) should be ignored.
Any suggestions on how to go about this?  I assume there is some check of some sort I should in the code (like if querystring is present, use this querystringparameter, else use the controlparameter), but I am not sure exactly what I should check for and how to set up these parameters programmatically.
 Thanks,
Jennifer

View 5 Replies View Related

SqlDataSource.SelectParameters Method

Apr 27, 2008

Hi,
 I am using a grid view with parameter defined in dropdown list. the asp code is:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Pubs %>"
SelectCommand="SELECT [au_id], [au_lname], [au_fname], [state] FROM [authors] WHERE ([state] = @state)"
DeleteCommand="DELETE FROM [authors] WHERE [au_id] = @au_id">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="state" PropertyName="SelectedValue"
Type="String" /></SelectParameters>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Pubs %>"
SelectCommand="SELECT [au_id], [au_lname], [au_fname], [state] FROM [authors] WHERE ([state] = @state)"
DeleteCommand="DELETE FROM [authors] WHERE [au_id] = @au_id">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="state" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</asp:SqlDataSource>
 I would like to to set the parameter assignment in my VB code in Page_Load methodWhen i am using:
SqlDataSource1.SelectParameters("state").DefaultValue = DropDownList1.Text
SqlDataSource1.SelectCommand = "SELECT [au_id], [au_lname], [au_fname], [state] FROM [authors] WHERE ([state] = @state)"I get error message saying: Object reference not set to an instance of an object.
Any ideas how I can set the select parameters (in my VB code) to use the dropdown list I have in my page?
Thanks,
 Uzi

View 8 Replies View Related

Setting The SelectParameters Of SqlDataSource

Dec 30, 2005

Hi All,
I'm trying to set the SelectParameters of SqlDataSource from the code behind.
This is my query: SELECT * FROM [UploadSessions] WHERE ([OwnerID] = @OwnerID)And I need to set the value of the @OwnerID at the code behind since it is stored in an object.
How can I do it??
Thanks in advance
Bar
 

View 7 Replies View Related

&<SelectParameters&> && Checked Items From CheckBoxList

Nov 24, 2006

Column1 in table 1 has a range from 1 to 5 (int)
A CheckboxList displays these 5 items. When checked (for example 1 and 4) I want a gridview with sqldatasource=sqlProducts to display the records where column1 values 1 or 4.
When I use the code below I only get the records where column1 values 1.... 
<asp:SQLDataSource id="sqlProducts" Runat="Server" SelectCommand="Select * From Table1 where Column1 IN (@CBLchecked_items)" ConnectionString="<%$ ConnectionStrings:pubs %>">            <SelectParameters>                            <asp:ControlParameter Name="CBLchecked_items" ControlID="CBL" propertyname="SelectedValue" type="String" />            </SelectParameters></asp:SQLDataSource>
 
 

View 2 Replies View Related

Retuen 1 Fild On SqlDataSource1.SelectParameters

Feb 28, 2007

 
 
ALTER PROCEDURE dbo.Default_Edit1
(
@ID int,
@Family Nvarchar (100) OutPut
)
AS
/* SET NOCOUNT ON */
SELECT @Family=Family FROM Table1 where (ID=@ID)
 
 
RETURN
 
 
SqlDataSource1.SelectParameters.Add("ID", Me.GridView1.DataKeys(CInt(e.CommandArgument)).Item(0))
SqlDataSource1.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure
SqlDataSource1.SelectCommand = "dbo.Default_Edit1"
SqlDataSource1.SelectParameters("Family").Direction = Data.ParameterDirection.Output
Label3.Text = SqlDataSource1.SelectParameters("Family").Direction.ToString()
 
it's have error 
I went to return 1 fild
 ??
 
 

View 2 Replies View Related

How To Set SessionParameter And QueryStringParameter Both In SelectParameters Of SQLDataSource.

Mar 14, 2008

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CollegeDatabaseConnectionString %>"                 SelectCommand="SELECT employee_datails.* FROM employee_datails WHERE memberid !=@id OR memberid OR memberid==uid">        <SelectParameters>                 <asp:SessionParameter Name="id" SessionField="userid" />                <asp:QueryStringParameter Name="uid" QueryStringField="memberid" />       </SelectParameters>    </asp:SqlDataSource> I tried like this but it is not working. It takes at a time one sessionparameter or querystringparameter. I want if profile.aspx--> then i want session parameter in select queryIf profile.aspx?id=12432---> then i want  querystringparameter in select query.

View 2 Replies View Related

How To Pass A Null To SelectParameters In SqlDataSource?

Feb 17, 2006

How to pass a null to SelectParameters in SqlDataSource?
The type of "CreateDate" is DateTime, the following code can be run correctly!
SqlDataSource1.SelectParameters["CreateDate"].ConvertEmptyStringToNull = true;SqlDataSource1.SelectParameters["CreateDate"].DefaultValue = "2006-11-12";
now I hope to pass null value to the Parameter "CreateDate", but the following 3 section codes don't work!
SqlDataSource1.SelectParameters["CreateDate"].ConvertEmptyStringToNull = true;SqlDataSource1.SelectParameters["CreateDate"].DefaultValue = string.Empty;
or
SqlDataSource1.SelectParameters["CreateDate"].ConvertEmptyStringToNull = true;SqlDataSource1.SelectParameters["CreateDate"].DefaultValue =null;
or
SqlDataSource1.SelectParameters["CreateDate"].ConvertEmptyStringToNull = true;SqlDataSource1.SelectParameters["CreateDate"].DefaultValue = "";

View 4 Replies View Related

How To Retuen Data With SqlDataSource1.SelectParameters At StoredProcedure

Mar 2, 2007

I Have This StoredProcedure
ALTER PROCEDURE dbo.Default_Edit1
( @ID int, @Family Nvarchar (100) OutPut
)
AS
SELECT @Family=Family FROM Table1 where (ID=@ID)
RETURN
 I went to use  SqlDataSource1.SelectParameters to Return Data
Ho to get and set @ID , @Family with  SelectParameters  ?
 
 
 
 

View 3 Replies View Related

Sqldatsource:SelectParameters:FormParameter Not Effective Till Postback?

Nov 14, 2007

I have a simple gridview that loads on page load. It uses an on page sqldatasource declaration in which there's a parameter in which value is already available in cookies. I added an asp:HiddenField and set that value on PageLoad() to the value of the cookies. I then set a FormParameter in the sqldatasource mapped to that hidden field. However that appears to have no effect at all. I'm guessing the sqldatasource will only use the form field after postback.

View 2 Replies View Related

Programatically Adding Selectparameters Depending On Options Selected

Jan 14, 2008

Hi everyone,
I am building a search page and am a bit stuck.
The page has an sqldatasource with no select command and i am passing the select command and parameters depending on the optionsm selected.
If a tick box is ticked and a drop down selected i need to add a parameter to the datasource and generate the select command.
then if 1 and or 2 trext boxes are filled in, add the 1 or 2 select parameters then generate the select command.
The select command is correct as far as i can tell , but the parameters are not being passed to the datasource so it doesn't select anything.
my code behind is in the page load handler and at the moment only adds the parameters in one place so i could test. 
Does anyone have any idea what i have done wrong?
 
Cheers
Chris
CODE BEHINDProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim SQLstr As String
 

If cb_Today.Checked = True And dd_Area.SelectedValue.ToString <> "" ThenLocManSearch.SelectParameters.Add("Area", TypeCode.String, dd_Area.SelectedValue.ToString())
SQLstr = "SELECT * FROM [LocMan_CV] WHERE ([area] LIKE '%" & dd_Area.SelectedValue.ToString() & "%') AND ([available] LIKE '%" & Date.Today & "%') AND ([viewable] = 'True')"
ElseIf cb_Today.Checked = False And dd_Area.SelectedValue.ToString <> "" Then
SQLstr = "SELECT * FROM [LocMan_CV] WHERE ([area] LIKE '%" & dd_Area.SelectedValue.ToString() & "%') "
ElseIf txt_FName.Text <> "" And txt_LName.Text <> "" And cb_Today.Checked = False And dd_Area.SelectedValue.ToString = "" Then
SQLstr = "SELECT * FROM [LocMan_CV] WHERE ([FirstName] LIKE '%" & txt_FName.Text.ToString() & "%') and [LastName] LIKE '%" & txt_LName.Text.ToString() & "%')"
ElseIf txt_LName.Text <> "" And cb_Today.Checked = False And dd_Area.SelectedValue.ToString = "" Then
SQLstr = "SELECT * FROM [LocMan_CV] WHERE ([LastName] LIKE '%" & txt_LName.Text.ToString() & "%')"
ElseIf txt_FName.Text <> "" And cb_Today.Checked = False And dd_Area.SelectedValue.ToString = "" Then
SQLstr = "SELECT * FROM [LocMan_CV] WHERE ([FirstName] LIKE '%" & txt_FName.Text.ToString() & "%')"
End If
Response.Write(SQLstr)
LocManSearch.SelectCommand = SQLstr
End Sub
 
SQL DATA SOURCE
 
<asp:SqlDataSource ID="LocManSearch" runat="server" ConnectionString="<%$ ConnectionStrings:MYLOCDEVConnectionString %>" >
<SelectParameters></SelectParameters>
</asp:SqlDataSource>

View 4 Replies View Related

Hi! 1st Time, Can't Program &<SelectParameters&> And Searching Around Brings No Definite Answer

Mar 22, 2008

Hello to all coding members!
I'm building my first ever complete website in the ASP.net VB language and I have to say, I'm pretty happy that I was able to learn from this website and to gain some ground.
Data retrieval and editing from tables and databases was very intuitive with the Visual Web Developer IDE. I even learnt simple ways to implement (and to script a bit of) login pages to make my visitors feel "at home" in my website.However, when I wanted to implement simple Business Logic into one of my ASP.net page, i happen to stumble upon a block.Business Logic: To have the server go through the whole table of storybook entries submitted by many users, but only pull out the storybook entry(s) that belong to the logged-on user.Hence, let me drill down to my specific questions:


I will be using VB. Coming from a JavaScript genre, my concern is: will putting the Business Logic code into a code-behind page (.vb) or dumping it onto the page itself have any errors or effects?

View 8 Replies View Related

SqlDataSource.SelectParameters Causing Procedure Or Function Stored Procedure Has Too Many Arguments Specified.

Sep 12, 2006

 Hi everybody,   I am having trouble how to fixed this code. I am trying to supply the parameterinside a stored procedure with a value, and displays error message shown below. If I did not supply the parameter with a value, it works. How to fix this?Error Message:Procedure or function <stored proc name> has too many arguments specified.Thanks,den2005 
Stored procedure:

Alter PROCEDURE [dbo].[sp_GetIdeaByCategory]
@CatId <span class="kwd">int</span> = 0
AS
BEGIN
SET NOCOUNT ON;

Select I.*, C.*, U.* From Idea I inner join IdeaCategory C on I.CategoryID = C.IdeaCategoryID inner join Users U on I.UserID = U.UserID Where I.CategoryID = @CatId Order By LastModifiedDate Desc
End


oDataSource.ConnectionString = constr;
oDataSource.SelectCommand = storedProc;<span class="cmt">//storedproc - sp_GetIdeaByCategory</span>
oDataSource.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
oDataSource.SelectParameters.Add(<span class="st">&quot;@CatId&quot;</span>, catId);
gdvCategories.DataSourceID = oDataSource.ID;

gdvCategories.DataBind(); &lt;&lt;--- Error occured here


 

View 1 Replies View Related

Issues Using Parameterised Reports Connecting To Oracle Using ODBC And Microsoft OLE DB Provider For Oracle

Sep 12, 2007

I have an issue using parameterised reports connecting to Oracle using "ODBC" and "Microsoft OLE DB Provider for Oracle" using parameteried reports. The following error is generated "ORA-01008 not all variables bound (Microsoft OLE DB Provider for Oracle)" and a similiar one for ODBC. It works fine for simple reports. Do these 2 drivers have issues passing parameters for a remote Oracle query?
Thanks.

View 4 Replies View Related

Output Column Has A Precision That Is Not Valid (loading From Oracle Using OraOLEDB.Oracle.1)

Apr 2, 2007

Hi!



I'm loading from Oracle using the OraOLEDB.Oracle.1 provider since I need unicode support and I get the following error:



TITLE: Microsoft Visual Studio
------------------------------

Error at myTask [DTS.Pipeline]: The "output column "myColumn" (9134)" has a precision that is not valid. The precision must be between 1 and 38.



------------------------------
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0204018 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------
For most of my queries to Oracle I can cast the columns to get rid of the error (CAST x AS DECIMAL(10) etc), but this does not work for:



1) Union

I have a select like "SELECT NVL(myColumn, 0) .... FROM myTable UNION SELECT 0 AS myColumn, .... FROM DUAL"

Even if I cast the columns in both selects (SELECT CAST(NVL(myColumn, 0) AS DECIMAL(10, 0) .... UNION SELECT CAST(0 AS DECIMAL(10, 0)) AS myColumn, .... FROM DUAL) I still get the error above.



2) SQL command from variable

The select basically looks like this:

"SELECT Column1, Column2, ... FROM myTable WHERE Updated BETWEEN User::LastLoad AND User::CurrentLoad"

Again, even if I cast all columns (like in the union), I still get the same error.



Any help would be greatly appreciated. Thanks!

View 10 Replies View Related

Setting Up Oracle Linked Server : Need Help : Sql2005 Running On XP Linking In Oracle 10.2

Oct 26, 2006

Is there any step by step help sites for setting up SQL 2005 linked (oracle 10) server?

I find MSDN articles but they referance winNT and 2000, I'm not getting very far and I'm not a DBA but need to get this working asap.

View 1 Replies View Related

Data Access :: Accessing Oracle Tables From Server Via Oracle DBLINK?

May 8, 2015

we recently got a scenario that we need to get the data from oracle tables which is installed on third party servers. we have sqlserver installed on ourservers. so they have created a DBLINK in oracle server to our sqlserver and published the DBLINK name.

what are the next steps that i need to follow on my sqlserver in order to access the oracle tables ?

View 2 Replies View Related

Oracle Connection Fail With Microsoft OLEDB Provider For Oracle MSDAORA.1

Feb 22, 2006

Hello,

On my dev server I have working ssis packages that use connections Microsoft OLEDB provider for Oracle MSDAORA.1 and Oracle provider for oledb and OracleClient data provider.

I use one or the other according to my needs.

In anticipation and to prepare for the build of a new production server, I have build a test server from scratch and deployed to it the entire dev.

Almost everything works except Microsoft OLEDB provider for Oracle.

ssis packages on the test machine will return an error

Error at Pull Calendar from One [OLE DB Source [1]]: The AcquireConnection method call to the connection manager "one.oledb" failed with error code 0xC0202009.

Error at Pull Calendar from One [DTS.Pipeline]: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.

[Connection manager "one.oledb"]: An OLE DB error has occurred. Error code: 0x80004005.

An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Oracle error occurred, but error message could not be retrieved from Oracle.".

I have used the same installers for OS, SQL and Oracle SQL*Net on both dev and test machines. The install and then the restore/deployment on Test went fine.

Does anyone could point me to the right direction to solve this issue?

Thanks,

Philippe

View 17 Replies View Related

Oracle Publication Error:The Permissions Associated With The Administrator Login For Oracle Publisher 'test1' Are Not Sufficient

Jan 12, 2006

Hi,

I am trying to make an oracle publiching from sql server 2005 enterprise final release, i installed the oracle client  10.2 (10g) on the same server where sql server already installed, i made different connection to oracle database instance and it was  ok.

 

from sql server : right click on publication -New oracle publication-Next-Add Oracle Publisher-Add button-Add Oracle Publisher-i entered server insttance test1 and their users and passwords--connect --->

the oracle publisher is displayed in the list of publisher but when press ok i got the following error :

TITLE: Distributor Properties
------------------------------

An error occurred applying the changes to the Distributor.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.DistributorPropertiesErrorSR&EvtID=ErrorApplyingDistributor&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

SQL Server could not enable 'test1' as a Publisher. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The permissions associated with the administrator login for Oracle publisher 'test1' are not sufficient.
Changed database context to 'master'. (Microsoft SQL Server, Error: 21684)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21684&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


Any idea about this error ?

Thanks

Tarek Ghazali
SQL Server MVP.


 

View 2 Replies View Related

Inserting Into Oracle Table That Has DATE_HIGH As A Partition And Need Oracle Sequence Used

May 11, 2007

Hi Everyone,



I've been searching for a solution for this for a week-ish, so I thought I would post my quesiton directly. Here is my scenario..



Source: MS SQL Server

Destination: Oracle 10g



The destination table has a partition set on a column called "DATE_HIGH". How do I populate this date high column in my package? Currently I just have a source object, and a destination object, but I'm unclear how to populate this field in the destination. I've read one blog that states "use OLE DB Command" - but that isn't enough information for me to implement - Can someone be more specific in these steps? Here is an example of what my newb-ness needs to understand



OLE DB Source (Select * from Table) ---> OLE DB Command (What query goes here?) --> OLE DB Destination.



Second part of my question: There is a second column called "ROW_NUM" and there is an Oracle Sequence provided to me... What objects do I need (Source, Destination, OLE DB Command etc...) and how do I call this sequence to populate on the fly as I'm loading data from my source?



If these are simple questions - my appologies, I am new to the product.



Best Regards,



Steve Collins

View 1 Replies View Related

Unable To Connect To Oracle Using Microsoft OLEDB Provider For Oracle

Aug 23, 2007

Hi everybody,

I have designed a DTS package which will migrate a view from Sqlserver 2000 to Oracle.My package is using Microsoft OLEDB provider for Oracle driver for connecting to oracle.Im able to execute this package on the my system ie on the system where sqlclient is installed(Oracle client is also installed on my machine) .But when im doing it on the server im not able to do it.The Connection to Oracle Fails.
I wanted to know in order to connect to Oracle from the server,is it necessary that Oracle has to be installed on the server?.If yes, is it enough if i install oracle client on the server or Oracle Server version has to be installed on Server.

Please suggest me wht should i do know?

Thanks in advance

Regards
Arvind L

View 3 Replies View Related

Trouble With: Linked Server To Oracle Using OraOLEDB.ORacle Provider

Jan 11, 2007

Hi--

 

I am running SQL Server 2005 on Win2k3:

Microsoft SQL Server Management Studio      9.00.2047.00
Microsoft Analysis Services Client Tools      2005.090.2047.00
Microsoft Data Access Components (MDAC)      2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML      2.6 3.0 4.0 6.0
Microsoft Internet Explorer      6.0.3790.1830
Microsoft .NET Framework      2.0.50727.42
Operating System      5.2.3790


I have the OraOLEDB.Oracle provider installed to the (C:oraclexe) directory.

I am having problems querying from linked oracle server.  When i setup oracle as a linked server and purposely enter an incorrect password the query i run tells me i have an incorrect password.   So it at least knows that.  when i set the correct password and run a query I get this error:

(i replaced the real server name with "someServer".)

Msg 7399, Level 16, State 1, Line 1

The OLE DB provider "OraOLEDB.Oracle" for linked server "SomeServer" reported an error. The provider did not give any information about the error.

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "SomeServer".

 

This is how I set up my Linked server:

Provider: "Oracle Provider for OLE DB"

Product Name: SomeServer

Data Source: SomeServer

Provider String:  "Provider=OraOLEDB.Oracle;Data Source=SomeServer;User Id=MyLogin;Password=MyPassword"

 

 

The query I run is:

Select * from [Someserver].[schema or database]..[tbl_name]

 

Any help???  What am i missing?

View 3 Replies View Related

How To Migrate Oracle Applications 11.03/Oracle 8.05 To Navision 4.0/ms Sqlserver

Oct 29, 2005

need a clue about how to migrate the data from an Oracle applications 11.03 and underlying Oracle 8.05 database to navision 4.0 running sql server 2000

tia

View 1 Replies View Related

Oracle Error ORA-12154 From An Application Which Never Uses Oracle

Mar 14, 2008

My application which ran perfectly well yesterday suddenly stopped working in this morning with following error message. I didn't change anything, at least I believe. Interesting thing is that I don't use any Oracle connection but connects to MS SQL Server 2005 Express version locally. Error messages are different according to the connection string though I don't think it makes difference:
ConnectionString = <add key="Databasehandtool1" value="Data Source=.SQLEXPRESS;Database=handtool;SSPI=true" />ErrorMessage from VS2008 ="Unable to get records. Object reference not set to an instance of an object."
ConnectionString = <add key="Databasehandtool1" value="Data Source=.SQLEXPRESS;Database=handtool;User Id=handtool_DB;Password=mypassword" />ErrorMessage from VS2008 =  "Unable to get records. Unable to connect to database. ORA-12154: TNS:could not resolve the connect identifier specified."   By the way, the application was generated from IronSpeed 5.1 Enterprise. My development environment is : VS2008, SQL2005 EXPRESS, Windows XP SP2, ASP.NET 2.0 
We have actually an Oracle server in the network though. My gut feeling is that something might have changed in my network server during the night but how come it can possibly affect my application running on my local PC. I checked the connection of local SQL Express Server from SQL Server Management Studio and it connected well with UserID=handtoo_DB and showed all tables and stored procedures required for the application. So there is no problem in SQL Server database side.
I would welcome and appreciate any input.
fudata

View 1 Replies View Related

Using SSIS For ETL From Oracle 10g ODS Into Oracle DW And From There Into SSAS Cubes

May 2, 2007

Hi,





This might seems a little 'out there', but has anyone tried doing ETL from an Oracle 10g ODS into an Oracle 10g DW, and from there into SSAS2005 cubes?



Any caveats houghtscomments on doing this?



Thanks,

JGP

View 1 Replies View Related

Parameterized Queries Running Slower Than Non-parameterized Queries

Jul 20, 2005

HelloWhen I use a PreparedStatement (in jdbc) with the following query:SELECT store_groups_idFROM store_groupsWHERE store_groups_id IS NOT NULLAND type = ?ORDER BY group_nameIt takes a significantly longer time to run (the time it takes forexecuteQuery() to return ) than if I useSELECT store_groups_idFROM store_groupsWHERE store_groups_id IS NOT NULLAND type = 'M'ORDER BY group_nameAfter tracing the problem down, it appears that this is not preciselya java issue, but rather has to do with the underlying cost of runningparameterized queries.When I open up MS Enterprise Manager and type the same query in - italso takes far longer for the parameterized query to run when I usethe version of the query with bind (?) parameters.This only happens when the table in question is large - I am seeingthis behaviour for a table with > 1,000,000 records. It doesn't makesense to me why a parameterized query would run SLOWER than acompletely ad-hoc query when it is supposed to be more efficient.Furthermore, if one were to say that the reason for this behaviour isthat the query is first getting compliled and then the parameters aregetting sent over - thus resulting in a longer percieved executiontime - I would respond that if this were the case then A) it shouldn'tbe any different if it were run against a large or small table B) thisperformance hit should only be experienced the first time that thequery is run C) the performance hit should only be 2x the time for thenon-parameterized query takes to run - the difference in response timeis more like 4-10 times the time it takes for the non parameterizedversion to run!!!Is this a sql-server specific problem or something that would pertainto other databases as well? I there something about the coorect use ofbind parameters that I overall don't understand?If I can provide some hints in Java then this would be great..otherwise, do I need to turn/off certain settings on the databaseitself?If nothing else works, I will have to either find or write a wrapperaround the Statement object that acts like a prepared statement but inreality sends regular Statement objects to the JDBC driver. I wouldthen put some inteligence in the database layer for deciding whetherto use this special -hack- object or a regular prepared statementdepending on the expected overhead. (Obviously this logic would onlybe written in once place.. etc.. IoC.. ) HOWEVER, I would desperatelywant to avoid doing this.Please help :)

View 1 Replies View Related

How To Run Queries???

Aug 9, 2006

Hi,
I am using visual web developer2005 express edition and finding hard time to get my query run in this i am making my own login page as i have few more things to ask to user before they get logged in so i am not using the login control.   
i want to write my own query without help of sqlDataSource control from start something like
sqldatasource con=new sqldatasource;
con.connection String=""
then what all things will come........ ???
and please give me some poitners to some articles which help one to do the requested.
 
Regards,
 
 

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved