Can't Access The Datasource Control

May 21, 2006

When I put a sqldatasource in my page and want to configure it and add a new connection to it I recieve this error : "object reference not set to an instance of an object" . Do you have any idea about solving this problem. please help me Thanks

View 5 Replies


ADVERTISEMENT

Help Assigning A Datasource To The Gmap Control In C#

Sep 18, 2007

I'm trying to assign a datasource to a gmap control in 2.0 so that i can get pushpins in the map for all the locations in the sql db. I've enclosed my code below as well as a link to the site that provides the control and their sample. Can anyone tell me why it won't show the pins? What am I doing wrong?
Thanks.
 My Code (sqllocations is a datasource):
GMap1.DataSource = sqllocations;
GMap1.DataBind();
Their site: http://en.googlemaps.subgurim.net/ejemplos/ejemplo_991000_DataSource.aspx
Their example (part of their explanation is not english, sorry):
 List<DataSourceField> fields = new List<DataSourceField>(); fields.Add(new DataSourceField(45, 2, "hola"));fields.Add(new DataSourceField(46, 3));// Lo comentamos porque al utilizar la clase DataSourceField, // pero si fuera un dataset o cualquier otra cosa, // le deberíamos dar los nombres correspondientes// GMap1.DataLatField = "lat";// GMap1.DataLngField = "lng";// GMap1.DataGInfoWindowTextField = "gInfoWindowText";GMap1.DataSource = fields;GMap1.DataBind();  
 

View 1 Replies View Related

Error Trapping Of Datasource Control

Oct 1, 2007

Hello,
I encountered an interesting situation. I have a gridview and a sqldatasource. It has delete function. When I delete a record an error of foreign key violation is raised. I would like to trap this error and give a user friendly message to the user.
If I use ADO.Net I can use Try/Catch, but it seems there is no way to do the same thing using datasource. Anyone knows?
Thank you,
J

View 6 Replies View Related

Dirty Read With DataSource Control

Nov 19, 2007

Hi all,
Can anyone tell me how I can do a "Dirty Read" on a SqlDataSource Control? I'm affraid that the record locks are causing problems on the live system.
It is connected to an infromix db using odbc. Thanks. 

View 1 Replies View Related

How To Check DataSource Control For Values

Jan 18, 2008

Hey all,
 I was wondering what the best method of checking on page_load if a datasource control is pulling back nothing from a database.  I want to display a message explaining that there is no data to be displayed.  How would I go about doing that?  I have tried searching google and whatnot but didn't find anything really helpful.
Here is the current code for the data source control.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|EventInsider.mdf;Integrated Security=True;User Instance=True"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT Events_Groups.GroupName, Events_Groups.GroupID FROM Events_GroupMembership INNER JOIN Events_Groups ON Events_GroupMembership.GroupID = Events_Groups.GroupID WHERE (Events_GroupMembership.UserID = @UserID)">
<SelectParameters>
<asp:SessionParameter Name="UserID" SessionField="UserID" />
</SelectParameters>
</asp:SqlDataSource>
 But I have no idea what the code behind would be to check it on page_load.  If there is no way to particularly do this, do you have to do it per control?  Like dropdownbox's or gridviews?  I am just confused on how to check to make sure there is data to be displayed.
Thanks,
Chris

View 3 Replies View Related

Does Anybody Know Where I Can Learn How To Add, Update, Delete Using SQL Datasource Control?

Mar 24, 2008

does anybody know where I can learn how to add, update, delete using SQL datasource control?  I have a couple of books that shows me how to SELECT but nothing shows me how to update, add new record or delete with the SQL data source control. Even this website doesn't have any tutorial. Does any body know where I can read up on how to use all features of this control? Or where that have a couple of examples on how to use it? 

View 5 Replies View Related

How Come I Can Connect To A Database Through A Datasource Control, But Not Code?

Apr 11, 2006

Hi I am trying to open a database connection to a Northwind database.  I can open it with a datasource control and return data to a gridview, but can't programically.  I get a sqlexception error.  this is ust for learning.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim S As New SqlConnection        Dim builder As New SqlConnectionStringBuilder        builder("Data Source") = ".SQLEXPRESS;AttachDbFilename=C:SQLNORTHWND.MDF"        builder("Integrated Security") = True        builder("Connect Timeout") = 30        builder("User Instance") = True        S.ConnectionString = builder.ConnectionString        Me.Label1.Text = S.ConnectionString        S.Open()        Me.Label2.Text = S.State.ToString        S.Close()        Me.Label3.Text = Me.SqlDataSource1.ConnectionString.ToString    End Sub
 The text in label2 and Label three are identical except there are "" around the datasource.
How come I can connect through the datasource control but not through code?

View 6 Replies View Related

SqlDataSource Insert, Update Delete Options Are Dimmed In Configure DataSource Control

Mar 23, 2008

I can select the tables and fields, but when I click on Advanced the Check Box to Create the Commands is not available. they are dimmed out.
Why is this happening, is it a setting that I have missed. Any help is appreciated.

View 1 Replies View Related

Creating MS Access Datasource

Mar 1, 2006

I am trying to create a MS Access datasource to use it in a IS dataflow. I've done the following things:

1.I've created an ODBC datasource - System DSN, pointing to the Access database.

2.I've created an ODBC connection manager pointing to the ODBS datasource that I created in the previous step.

3.I've created a DataReader Source that uses as its Connection Manager the connection manager that I created in the previous step.

I get the following error message: "Cannot acquire a managed connection from the run-time connection manager." What can I do to solve this error?

Pedro Martins

View 1 Replies View Related

Access Datasource In Script Component

May 2, 2006

I'm trying to access a group of rows in a data source in my script
component (transformation). Currently im using the connection manager
in the script component, acquire the connection, and issue a query
command to get the data. This will happen on every rows being pass to
the script component from the data source. Is there a better way to
access the a group of rows from the data source?

View 1 Replies View Related

CLR Stored Procedure To Access Ole Datasource, How?

Feb 22, 2006

I tried to write a CLR stored procedure using C# in SQL 2005 to access an Access
database.

When I use the OleDbConnection class in System.Data, the procedure throws SecurityException at runtime.
Output as following:

System.Security.SecurityException: Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.OleDb.OleDbConnection.PermissionDemand()
at System.Data.OleDb.OleDbConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at Dbbest.Data.BulkStuff.bulkcopy(String source_oledb_connection_string, String source_table, String destination_table, Int32 batchSize, Int32 notifyAfter)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Data.OleDb.OleDbPermission
The Zone of the assembly that failed was:
MyComputer

View 1 Replies View Related

Setting Up Datasource To Access SQL Server From Excel 5.0a

Nov 6, 2007

Hi all,

Please advise which kind of connection should be establish from excel 95 to MS SQL Server.

From my thought, I understand that the connection depends on Windows version rather than excel version.
Thus, I just think that there will not be any issue connecting to SQL Server from Excel 5.0a.

Kindly advise if there is any addtional point to concern/consider further.
What could be issue connecting to SQL Server 2005 from Excel 5.0a.

Thank you very much

View 1 Replies View Related

Problems Adding MS Access Datasource In VB Studios 2005 Enterprise

Mar 8, 2006

I am running Visual Studios 2005 enterprise edition and I am creating a mobile application to keep track of some receipts. The problem I'm currently having is that even though I can connect to the MS Access Database with Server Explorer that I'll be aquiring data from; Everytime I attempt to use the Data Configuration Wizard to add a new data source that namely the database I get this error message:

The new connection uses a data provider that is not supported. (end of message)

There is no username or password necessary to access this database and it is an Access 2003 database.

Any help would be greatly appreciated.

View 14 Replies View Related

DTS Access Control

Mar 2, 2006

Is there any access control available for the DTS package? I want to create an a/c that can create/modify but cannot delete DTS. Is there any way I can do that?

View 2 Replies View Related

Drill Down Access Control In SSRS

May 6, 2008

HI,

i would like to know whether you can control access to a drill down in a report in ssrs.
thanks for your help in advance.

thank you
Kanthi

View 3 Replies View Related

Remote Access Control Manager

Mar 15, 2008

View 4 Replies View Related

User Control Data Access Error

Mar 3, 2008

When creating a user control (ascx) and registering it in the webpage, an error occurred:
"Login failed for user ''. The user is not associated with a trusted SQL Server connection."
This error does not appear when creating data access normally, and I don't use username/password for the northwind database; any suggestions.

View 5 Replies View Related

Using Access Form Control As SQL Function Criteria

Jul 28, 2006

I have a combo box named [myControl] on an Access form that I can use to select/enter a site name (ABC). There is a button on the same form that runs a report. The underlying record source for the report is a SQL Function. Is there an easy way to pass the combo box value to the SQL Function so that only records for site 'ABC' are displayed in the report? I tried Forms![myForm]![myControl] in the criteria box of the Function and it did not work. THANKS!

View 3 Replies View Related

Can We Access Reporting Server By URL In The Enviornment Of Domain Control?

Dec 1, 2007



If the net is domain control.

Can we use reporting server as usual?

Or need some special setting about it for protect it working well?

Thanks

View 1 Replies View Related

Reporting Services :: Can Control Access Of Parameters From Login Accounts?

May 24, 2015

I am just wondering if i can control the access of range of variables from users' logins.

To be more specific, if i a parameter alpha has five values (1,2,3,4,5) and then i have 3 users A, B C, what i need is:

1. A can access Vaues(1, 3)
2. B can access Values (2, 4)
3. C can access Values(3,5)

Is there anyway i can do this either from the stored procedure i am getting the data or i can do it on SSIS development side?

View 4 Replies View Related

Control Access To SQL Server 2005 Database Only Through Stored Procedures Issue

Apr 14, 2008


Hello,

I have a database (SQL 2005) with two schemas (dbo and s1) and with tables defined in dbo and tables defined in s1. The stored procedures are also defined in both schemas, some of them in dbo some of them in s1. Some of the stored procedures query tables from dbo and s1 at the same time.
I want to have a new db role with access to the database only through sps and no other access read/write to the tables. I created a new db role and granted execute permission to it and assigned a user to it.
When I execute stored procedure defined in dbo with query against dbo tables, it works as expected.
However, if I run stored procedure defined in s1 with query to table in dbo, I receive error about missing select permission for the table in dbo. I am not sure why, but I can assume there is an issue with the ownership chain.
I can grand read/write permission for the tables, but this will break our original requirement for limited access to the db only through sp.
The other option is to have another role r2, with read/write, privilege and to use EXECUTE AS r2 in the sp.

I would like to ask first why the error for missing select permission happens and is there another way to have role restricted to only execute permission for all stored procedures.

Thanks,
IT

View 5 Replies View Related

Problem Use Sqldatasource To Access Stored Procedure And Get Data Bind To Label Control

Aug 30, 2007

Hi every experts
I have a exist Stored Procedure in SQL 2005 Server, the stored procedure contain few output parameter, I have no problem to get result from output parameter to display using label control by using SqlCommand in Visual Studio 2003. Now new in Visual Studio 2005, I can't use sqlcommand wizard anymore, therefore I try to use the new sqldatasource control. When I Configure Datasource in Sqldatasource wizard, I assign select field using exist stored procedure, the wizard control return all parameter in the list with auto assign the direction type(input/ouput....), after that, whatever I try, I click on Test Query Button at last part, I always get error message The Query did not return any data table.
My Question is How can I setup sqldatasource to access Stored Procedure which contain output parameter, and after that How can I assign the output parameter value to bind to the label control's Text field to show on web?
Thanks anyone, who can give me any advice.
Satoshi

View 2 Replies View Related

Access Control List (structure) Invalid - Updating Virtual Directory Information

Sep 26, 2005

Hi,I've just installed SQL server and then IIS and SQLCE tools.I created a virtual directory and was trying to update the NTFSpermissions from SQLServer Connectivity management when i got thefollowing error - Access Control List (structure) invalid.Has anyone come across this and if so, what did u do to fix it.ThanksLyn

View 2 Replies View Related

Issue With SSRS Report Exporting To Excel With The Matrix Control Inside The Table Control

Jan 27, 2008

Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.

With Thanks
M.Mahendra

View 5 Replies View Related

Is It Possible To Embbed And Ocx Control On A Report Or Some Sort Of Interactive Control Like A Flash.ocx?

Oct 25, 2007

does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.

View 1 Replies View Related

How To Fetch The Recrods From MS Access And Using It In Script Task Using Control Flow Tools(Execute SQL Task)

Jun 14, 2006

Hi

I have an application like fetching records from the DataBase(MS Access 2000) and results i have to use in Script Task. At present i have used the record fetching query,connection string in Script itself. I would like to use in Independently. Is there any Tools like (Control Flow Tools like Execute SQL Task) are there to fetch the result set from Acccess and can use the fetching results in Script Task....

Thanks & Regards

Deepu M.I

View 5 Replies View Related

Reporting Services From WebBrowser Control - Print = Unable To Load Client Print Control

Mar 20, 2007

UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...) 





UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.







My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."

I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.



Any ideas how to support Reporting Services "Print" from within a WebBrowser control?

RELATED THREADS

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=332145&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=264478&SiteID=1

 

 

View 1 Replies View Related

SQL DataSource

Mar 28, 2007

I working on a form using an SQL DataSource. I am going to add a where clause. In that where clause a value from a label will be passed from the user.
How do I pass to the HTML Source the label value from the where clause. The value can change from user to user.
Sample below:
SELECT [KeyRolesID], [KeyRolesDesc] FROM [KeyRoles] WHERE ([JobCodeFamily] = @JobCodeFamily).
I want to replace the @JobCodeFamily which is currently coded with a value from the Sql DataSource in the design form with a label value entered by the user.

View 2 Replies View Related

Wcf For Xml Datasource

Aug 28, 2006

Hi, guys

I used an exported wcf service as a web service, try to use it as the reporting datasource,

[OperationContract]

DataSet GetTestReportData();

the app.config in the service host:

<configuration>

<appSettings>

<add key="BaseReportingAddress" value="http://localhost:8999/ReportHandlerService"/>

</appSettings>

<system.serviceModel>

<services>

<service name="Reporting_Handler.ReportHandlerService">

<endpoint address="http://localhost:8999/ReportHandlerService"

binding="basicHttpBinding"

behaviorConfiguration="ReportingServiceBehavior"

contract="Reporting_Handler.IReportingHandler"/>

</service>

</services>



<behaviors>

<behavior name="ReportingServiceBehavior">

<metadataPublishing

enableGetWsdl="true"

enableMetadataExchange="true"

enableHelpPage="false">

</metadataPublishing>

</behavior>

</behaviors>

I set the datasource type as xml and the connection string to http://localhost:8999/ReportHandlerService, the query string for dataset is

<Query>
<SoapAction>
http://tempuri.org/IReportingHandler/GetTestString
</SoapAction>
<Method Namespace="http://tempuri.org/IReportingHandler/"
Name="GetTestString">
</Method>
</Query>

but it doesn't work, I tried use a pure asp.net web service and it works. can anyone help me to set the connecting string for datasource and query for dataset when it using wcf as the web service? Thanks in advance.



bruce



View 2 Replies View Related

What Is A Datasource Used For?

Mar 18, 2008

Hi All,

I have a question about the datasource that we create on the Report Manager. What is it used for? In the below connection string which is given in the "Connection String" text box of a datasource link:

"Data Source=ProdServer;Initial Catalog=Northwind"

What is this datasource used for? Is it used only to use the ReportServer database or even our queries incorporated in the RDL files will be run against this datasource? I think the latter should not happen because while creating RDL files also, we provide a connection string to run the stored procedures against that datasource.

Please let me know about the same.

Thanks a lot and let me know if the question is not clear.

Manoj Deshpande.


View 11 Replies View Related

Sql Datasource Has Too Many Arguments

Sep 13, 2006

Can someone help me with this?  For the life of me, I cannot figure out why I recieve this error: Procedure or function usp_ContactInfo_Update has too many arguments specified.Here is my code: <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"SelectCommand="usp_ContactInfo_Select" SelectCommandType="StoredProcedure" UpdateCommand="usp_ContactInfo_Update"UpdateCommandType="StoredProcedure"><UpdateParameters><asp:Parameter Name="Division" Type="String" /><asp:Parameter Name="Address" Type="String" /><asp:Parameter Name="City" Type="String" /><asp:Parameter Name="State" Type="String" /><asp:Parameter Name="Zip" Type="String" /><asp:Parameter Name="Phone" Type="String" /><asp:Parameter Name="TollFree" Type="String" /><asp:Parameter Name="Fax" Type="String" /><asp:Parameter Name="Email" Type="String" /><asp:Parameter Name="Res" Type="Boolean" /><asp:Parameter Name="Res_Rec" Type="Boolean" /><asp:Parameter Name="Com" Type="Boolean" /><asp:Parameter Name="Com_Rec" Type="Boolean" /><asp:Parameter Name="Temp" Type="Boolean" /><asp:Parameter Name="Temp_Rec" Type="Boolean" /><asp:Parameter Name="Port" Type="Boolean" /><asp:Parameter Name="Land" Type="Boolean" /><asp:Parameter Name="Drop" Type="Boolean" /></UpdateParameters><SelectParameters><asp:ProfileParameter Name="DivID" PropertyName="Division" Type="String" /></SelectParameters></asp:SqlDataSource>Here is my Stored Proc:ALTER PROCEDURE dbo.usp_ContactInfo_Update @Division varchar(1),@Address varchar(50),@City varchar(50),@State varchar(2),@Zip varchar(10),@Phone varchar(20),@TollFree varchar(20),@Fax varchar(20),@Email varchar(50),@Res bit,@Res_Rec bit,@Com bit,@Com_Rec bit,@Temp bit,@Temp_Rec bit,@Port bit,@Land bit,@Drop bit/*(@parameter1 int = 5,@parameter2 datatype OUTPUT)*/AS/* SET NOCOUNT ON */ UPDATE tblDivisionSET Division = @Division, Address = @Address, City = @City, State = @State, Zip = @Zip, Phone = @Phone, TollFree = @TollFree, Fax = @Fax, Email = @Email,Residential = @Res, Residential_Recycling = @Res_Rec, Commercial = @Com, Commercial_Recycling = @Com_Rec, Temp = @Temp, Temp_Recycling = @Temp_Rec, Portable_Restrooms = @Port, Landscaping = @Land, Drop_Off_Center = @DropWHERE (Division = @Division) RETURNAny Help is greatly appreciated!

View 2 Replies View Related

Sql Datasource Not Updating

Mar 6, 2007

I have this web store that I have been creating.  When a customer goes to check out, he has to log in, then he is redirected to a page where he can view/add/or edit shipping and billing address.  I have based all the sql statements on the profile username, adding records and retrieving them works just fine.  When I go to change something in the info it uses an sql statement that updates based on "Where AccountUserName = @AccountUserName", I have @AccountUserName set to Profile("Username").  Keep in mind this works fine for adding new or bring up current records.  I even put in code in the updated event for the sql data source to post a msgbox telling me how many rows were affected, it says 1 even though I dont see any change in the data.   What am I doing wrong here, it's driving me nuts, its just a very simple update. 

View 2 Replies View Related

Help! C# - Forms - Datasource

Mar 14, 2007

My god.All I want to do is post the contents of a web form to a database sql express 2005 or access using C#.  Why can I find nothing for this very simple process online?Can you tell I am totally frustrated? So lets say i have a few text fields and I want to click submit and have that entered into a table.  I use C# for code behind.  So I can do basic C# programming and I can to webforms with visual web developer 2005 dragging and dropping for textboxs and a button to the aspx page. But then the mystery begins for me.  How the hell do I simple post that form data to the table.  I understand connection string basics.  I aslo can design and create tables. But tying this all together is becoming a problem.  I don't want to use gridview formview detailview or any of that canned UI stuff.  I also don't understand VB and when I see VB examples they only cloud my already cloud ASP.NET world. Please help by posting examples, and maybe some links or books to add to my newbish collection. Thanks,Frank 

View 3 Replies View Related







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