Showing posts with label provider. Show all posts
Showing posts with label provider. Show all posts

Friday, February 24, 2012

ASPNETDB with publish provider

Hi!

I have created a sql script with publish provider and the file has all information about ASPNETDB and now i want to drive the sql script into my databas on my webbhosting.

How do i? i haveSQL Server Management Studio Express to admin my databas.

any?

I doubt you can connect directly to the database server on your webhosting company, but if you can then you should do like this:

Start Management Studio Express. Choose connect to server. Enter the name of the server (or IP) you wish to connect to. Make sure you enter the correct username and password. In this case I believe you should be using SQL authentication with the login you've been given from your hosting company. Once logged in, you start a new query (which will basically give you an empty window). Make sure your database is selected in the combo, and then simply paste your SQL code and press "play" :-)

If you cannot connect directly, through Management Studio Express, they may have web interface (such asSQL Server Web Data Administrator)that you can use to login to the server through the browser. But you must check with the company if they have such a system.

If this option is not available either, then you need to wrap up your code in an ASP.net page and execute it on the server. Let me know if this is what you need, and I can help you getting started with this.

Good luck!

|||

I think it works fine, my tables was created in my databases system tables folder.

But when iam trying to login, i get this messages:

EXECUTE permission denied on object 'aspnet_CheckSchemaVersion', database 'dbname', owner 'dbo'.

DO you iknow anyting of that?

|||

You installed the tables under a database login that "owns" the database i.e. is dbo.

When you log into your application, the connection is using different login/password that is not dbo i.e. has not been permissioned to use the stored procedures within your database. Either use the dbo login to provider your application login with the appropriate permissions (in this case "GRANT EXECUTE on [stored procedure name] to [login name]", or assign your application login with dbo permissions.

If you take the former route of assigning permissions on the actual database objects to your application login - note that the login will probably need execute permissions on all the stored procedures starting with aspnet_ in that database.

|||

So now i have created my table with a correct owner, but when i try to login on my webpage, i get same error.

How can i change the login ASP.NET control to check this table owner.aspnet_Users instead of dbo.aspnet_Users?

Any?

|||

Why do you want the aspnet_ tables under a different owner? They really should be under dbo.

|||

Because i get error messages when i try to login on the webpage, (the error message i write on top).

But if you have another idés so tell me. My userid to the database maybee couldt work with owner dbo.

|||

One Simple Answer to You.

SQL Server Database Publishing Services

http://www.microsoft.com/downloads/details.aspx?FamilyId=6F03273C-FFC8-4F5E-BAFC-041FBD68FD1E&displaylang=en

Sunday, February 19, 2012

ASP: error when trying to insert record

I receive the following error when trying to INSERT INTO; am using Access db.

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

The code is as follows:

<%
Dim dbConn
set dbConn = server.CreateObject("adodb.connection")
dbConn.open("connect")
dbConn.Execute("INSERT INTO tbl_country (region, countryName, population, country_currency, description, imageURL, imageALT) VALUES ('" & Request.Form("region") & "', '" & Request.Form("countryName") & "', '" & Request.Form("population") & "', '" & Request.Form("country_currency") & "', '" & Request.Form("description") & "', '" & Request.Form("imageURL") & "', '" & Request.Form("imageALT") & "'),")
Response.Redirect("admin_master.asp")
%>

I would greatly appreciate any help you can give me.

Judging by the error message, you are likely trying to insert the wrong datatype into one of the columns..population maybe? I'd have to see the table definition to know for sure..|||

Please verify the Numeric data typed column's values on your query (Request.Form values). If the user given blank input then your query generate the blank string ('') & it will try to insert in the respective column which will throw error.

It always good idea to use the Stored Procedure or Parameterized query. Your code is violating the security standards it will allow the sql injection. Beware of SQL Injection.. Never use Dynamic Queries on your UI


|||+1 against dynamic sql and for paramtrized queries. If you are not sure which statement is executed against the database, put the whole build string into a string variable and output it to the Response stream, you will be easily able to find the error then. In most cases of dynamic SQL and the situations I have seen such implementation like you posted, the problem was based upon a wrong order of the parameters / columns.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
--

Thursday, February 16, 2012

ASP.Net SQL Provider

Hello,
I am using the Visual Web Developer and would like to use the Web Site
Administration Tool to connect to a remote SQL server (it defaults to SQL
Express).
I have already run the regsql tool. My tables on my remote SQL server are
installed.
How do I add a provider in the code since I cannot do it in the GUI?
Thank you,
Exchange2003See if this helps you
www.ConnectionStrings.com
Madhivanan

Sunday, February 12, 2012

ASP.NET and OLAP offline cube

Hi,

I would like to know the provider for OLAP offline cube, I mean to say that how I would able to connect to offline cube from asp.net, Please help me on this.

Jag

Use OLEDB. There are many examples on the Internet so search for: asp.net oledb. Here is an overview of the architecture: http://msdn2.microsoft.com/en-us/library/ms174518(SQL.90).aspx

You will also need a local cube engine (msmdlocal.dll) on the client machine. It is described in detail in the article I mentioned above.

|||

Thank you Greg,

but I did not found any sample solution about provider how i could able to connect, please let me know if you have any sample

Jagan

|||

I am not an ASP developer but I found some sample code here: http://www.w3schools.com/aspnet/aspnet_dbconnection.asp (sample for SQL) and http://www.businessintelligence.com/ex/asp/code.52/xe/article.htm (AS 2000 but it still applies to 2005)

I searched for: asp.net olap open connection

Basically, you need to open an OLEDB connection where the connection string specifies the provider as MSOLAP and data source as a local cube. Something like this: "Provider=MSOLAP.3; Data Source=C:\full_path_to_your_local_cube.cub"

I hope this helps at least a little.

|||

Hi

I tried with that, but it does not work.. thrown Provider error.

Thank you,

rgds

Jag

|||Did you add a reference to the right COM components in your project? It is described in the second article I mentioned (search for "reference" in the content of that webpage). If your project references the ADODB/ADOMD components and you are still getting an error, please, give more details on the error message and attach a piece of code where you are trying to open the connection.|||

Thank you Greg, its working fine.

but i had another question like I am using local cube with owc10, I am trying to display data in pivot table,

the code below I am using

Dim strOLAPConn As String = ConfigurationSettings.AppSettings("OLAPConnectionString")

Try

Dim objPT As PivotTableClass = New PivotTableClass
Dim objPTView As PivotView
Dim fldDeptElmt As PivotFieldSet

objPT.ConnectionString = strOLAPConn
objPT.DataMember = strDataMember
objPTView = objPT.ActiveView
objPTView.TitleBar.Caption = ""
fldDeptElmt = objPTView.FieldSets("Dept to Element")
objPTView.RowAxis.InsertFieldSet(fldDeptElmt)
objPTView.FilterAxis.InsertFieldSet(objPTView.FieldSets("Payperiod"))
objPTView.DataAxis.InsertTotal(objPTView.Totals("Dollars"))
objPTView.DataAxis.Totals("Dollars").NumberFormat = "$#,##0"

m_XML = objPT.XMLData

objPT = Nothing


The bolded line code is giving me a error Invalid class string when i use offline cube, but if I connect to online cube I shoudn't have any issue.

please advice me .

Jag

ASP.NET and OLAP offline (.cub) file provider

Hi,

I would like to know, what provider I must use to access the olap offline cube. also is there any way to connect offline cube with asp.net, if so how?. if you have any good examples for that please let me know.

thank you in advance.

Rgds

Jag

I'm not an expert in this by any means, but I suggest you look at the docs for ADOMD.NET and XMLA in SQL Server Books Online.

You may also be able to use the older ADOMD.

- Dave

|||

Moving to the SQL Server "Data Mining" Forum.