Showing posts with label publish. Show all posts
Showing posts with label publish. Show all posts

Thursday, March 22, 2012

AT the moment i have an SQL SELECT Statement as follows....

SELECT H.id, H.CategoryID ,H.Image ,H.StoryId ,H.Publish, H.PublishDate, H.Date ,H.Deleted ,SL.ListTitle

FROM HomePageImage H

JOIN shortlist SL on H.StoryId = SL.id

order by date DESC

is it possible to join to another table in the same query to get a value out.

it would be JOIN categories C on H.CategoryID = C.CategoryID

is this possible. can anyone help?

This should help

http://www.vb-tips.com/InnerJoin.aspx

|||

is this what you want?

SELECT H.id, H.CategoryID ,H.Image ,H.StoryId ,H.Publish, H.PublishDate, H.Date ,H.Deleted ,SL.ListTitle

FROM HomePageImage H

JOIN shortlist SL on H.StoryId = SL.id JOIN categores C on h.CategoryID=C.CategoryID

order by H.date DESC

|||

Yes, Thanks for help.

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 12, 2012

asp.net cannot connect to sql 2000

i have do a web site with asp.net 2.0

when i run the on the development pc it can coonect to db

when i publish the website, it become cannot connect to sql2000

the conn string as below
strConn = "Data Source=SHHDB;Initial Catalog=test8;Persist Security Info=True;User ID=sa;Password=;Trusted_Connection=yes;Current Language=British;"

the DB server is on other pc with same network

and i have public it to same pc with the development pc

it come out with "erro like cannot connect to sqlserver 2005, name pipe error: 40"

the problem is the both iis and dbpc don have sql 2005

only db server installed sql 2000

Hi,

From your question, it seems your application is attemp to use the LocalSqlServer connectionstring which needs a attached Sql Express database, so please don't use the LocalSqlServer and open your Web.Config file and in the ConnectionString node, modify your connection string and make it look like "Data Source=ServerName\InstanceName(or IP address);Initial Catelog=DatabaseName; User id=;Password=". Meantime, as your DB server is on other pc with same network, so please use some tools such as QA to verify if the remote database server can be accessible first.

Thanks.

|||

Sorry duplicate post

|||

Hi,

do you've admin rights to database server? if yes then by yourself or else ask your admin to enable remote connection on the database server. may be following link will help you

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22604523.html

thanks,

satish.