|
I am using SQL Server 2005 for my web application.The Database I am using is located on a remote server and I am accessing the database from my local Machine.I have used stored procedures for all the database operations.When I was running my application(On my IIS) i.e., localhost, it was working fine, so I uploaded all the compiled pages to the web server.Now the pages which don't require database operations are working fine but whenever database connectivity is required an application runtime error is occuring.Someone told me to grant permissions to the users/guests for the stored procedures and I did the same.The problem is when permission link is clicked there are 4 database objects to be selected Administrator, Dataadmin, guest and whbuser.I want to know what permissions should be given to which one?I granted permissions to first 2 objects but its still not working.What could be the solution so that the database may be used by the site's users for their respective purpose?What is the complete procedure to make a remote database work with front end successfully?Thanks..
|
|
|
|
|
zafar sultan wrote: When I was running my application(On my IIS) i.e., localhost, it was working fine
Localhost could also refer to the built in webserver inside Visual Studio. This doesn't use IIS and it will run with YOUR permission set, not that of the webserver. Are you absolutely use it is your local IIS?
zafar sultan wrote: Someone told me to grant permissions to the users/guests for the stored procedures and I did the same
Blindly granting access to stuff really blows holes in your security. Please think about what you are doing with that regard and think about what is actually happening when you do these things. If you don't understand then please get a good book on .NET web application security.
zafar sultan wrote: permission link
Permission "link"? Are you configuring your database through a web site? (e.g. Your hosting provider). If that is the case then I cannot tell you what they have set up.
What does your connection string connect to the database as? That will point you in the right direction as to what permissions you need to be changing.
zafar sultan wrote: What is the complete procedure to make a remote database work with front end successfully?
That depends on your set up.
|
|
|
|
|
I got this part message in my email...
zafar sultan wrote: No it is not the built in web server(SQLEXPRESS) that i am using i am using a remote database which I created on a remote server(from my web hosting service provider).It is created successfully and can be accesed if i use my application from my machine(localhost).The only problem is my application can not access the database when it is accesed through web browser.What could be the reason and how it can be solved?
This was my connection string
When it was not working i changed it to
But it is still no...(continued)
If you have solved your problem let others know as it helps them if they have the same problem, don't just delete messages.
|
|
|
|
|
Actually I submitted the wrong query string so I deleted the message and was trying to write the new one when the connection disturbed.Sorry for that.
This was my connection string
<connectionStrings>
<add name="myconnectionstring" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=mydatabasename;User ID=databaseuser; Password=mypassword"/>
</connectionStrings>
When it was not working i changed it to
<connectionStrings>
<add name="myconnectionstring" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=mydatabasename;User ID=databaseuser; Password=mypassword; User Instance=True"/>
</connectionStrings>
and its still not working.My problem is not solved.
And by permission "link" I mean the option given by SQL Server Management Studio(After right clicking the stored procedure and then clicking on properties)Thats where I had to provide database objects and permission for each of them(Control,Execute,Write and so on)
|
|
|
|
|
Hello All,
Can any one Help Me to resolve the Below problem.
EventID : 17809
Could not connect because the maximum no of 6 users are already been reached.the system administrator can use sp_config to increase the maximum value.
Please help me to get rid of this Problem
Thanks
riz
|
|
|
|
|
rrrriiizz wrote: Please help me to get rid of this Problem
Have you tried the suggested course of action in the error message?
The suggestion was:
SQL Server wrote: the system administrator can use sp_config to increase the maximum value.
|
|
|
|
|
I dont know How to Use this command
SP_config XX this is enough
XX -> No of users need to connect.
that is SP_config 25
But this Command is no longer Use. What can i Do Now?
Thanks
Riz
|
|
|
|
|
|
Hi All,
I am new to SSRS and I need help in getting the list of recently viewed 5/10 reports.
I want to populate the names of recently viewed 5-10 reports in a Drop Down List so that I can select one report from the Drop Down List and view it in Report Viewer. For this I want to know how we can get the list of those recently viewed reports from the Report Server.
Please suggest.
Thanks.
archie
|
|
|
|
|
Hi, I need to migrate my database from sql server 2005 to 2008.
Please provide me the steps for the same.
thanks
raj
|
|
|
|
|
|
Let me understand this, you have a job to do but you want us to do it for you.
I've got a fence to paint, anybody want to do that ?
Signed,
Tom Sawyer
|
|
|
|
|
David Mujica wrote: I've got a fence to paint
Hah. I have a house that needs painting. Wonder if the OP would be up to it
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Step 1.)Install SQL Server 2008
Step 2.)RTFM
“If we are all in agreement on the decision - then I propose we postpone further discussion of this matter until our next meeting to give ourselves time to develop disagreement and perhaps gain some understanding of what the decision is all about.”-Alfred P. Sloan
|
|
|
|
|
My date format in MS SQL is DD/MM/YYYY hh:mm:ss and it seems the calender in VS 2008 has the date format MM/DD/YYYY
So every time I try query information from my web app(using the criteria of specific periods of time using the calender object) I get bad information if any...
Any advice on how to get the two dates working correctly together...
Also, what should the standard date format be if there is one?
Thanks
|
|
|
|
|
span98 wrote: My date format in MS SQL is DD/MM/YYYY hh:mm:ss
SQL Server does not have a date format. It may display dates in a specific format and T-SQL may interpret strings in a particular format if required but SQL Server itself, internally, does not have a date format.
Your request suggests that you are not using parameterised queries. You should learn to use parameters because they will not care about date formatting so long as you tell it that a parameter is a date and you use a DateTime object in .NET. Also, parameterised queries will reduce the chances of being vulnerable to a SQL Injection Attack.
|
|
|
|
|
Can you explain the parameterised query for me? I am requesting certain data from within a table and wanting the results between 2 certain dates. So my query looks something like this:
select top (1) count([destination telephone no]), [destination telephone no]
from calls
where (Name LIKE '%' + @name + '%') AND ([DateTime] >= @start) AND ([DateTime] <= @end)
group by [Destination Telephone No]
order by count([destination telephone no])
So I am requesting the info for that specific time period. @start and @end being my controls on my .aspx side
|
|
|
|
|
@name , @start and @end are all parameters, so you are already using a parameterised query - So, I can only assume that @start and @end are the wrong datatypes otherwise you should not be getting the problem you are getting.
@start and @end should be DateTime objects on the .NET side and SMALLDATETIME or DATETIME objects on the SQL side.
|
|
|
|
|
My SQL table where the data is, has the field type DateTime. My PC language is set to UK which puts it in the format DD/MM/YYYY.
Also I have set my SQL language to British English...
"@start and @end should be DateTime objects on the .NET side and SMALLDATETIME or DATETIME objects on the SQL side. "
How do I change it on my .NET side? That might help if I can change the way the .NET is reading my date format from SQL
|
|
|
|
|
span98 wrote: How do I change it on my .NET side?
What is your existing code?
span98 wrote: That might help if I can change the way the .NET is reading my date format from SQL
The code you showed me earlier does not indicate that the .NET side is reading any dates. It is passing dates to SQL Server (i.e. it is writing dates)
|
|
|
|
|
That code from above takes the dates from 2 calenders on my .aspx page and requests that data from my SQL database within the constrains of those two dates.
That is how I have been doing it. I have those two dates setting the parameters of what my request needs to comply with. It then simply displays the data that is requested for that specific time period
|
|
|
|
|
span98 wrote: That code from above takes the dates from 2 calenders on my .aspx page
No, it doesn't. The code you've given already is SQL only. It takes nothing from any calendars. It may have received information that ultimately came from calendars, but not there.
I need to see .NET code. Describing it to me is not sufficient.
|
|
|
|
|
I'm not sure which code you are looking for.
I have bound my calender control to the terms @start and @end? That is the only code I can think of. The rest of my code is SQL. I've bound all my objects to DataSources on my .aspx and display them in dataViews etc. So I don't know where else I would have code as it does it all for you implicitly...
|
|
|
|
|
Don't know if it applies in SQL 2008, but in 2005 and earlier I always use this before my queries:
SET DateFormat dmy
as this tells SQL Server what format to expect dates in.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I'm a newbie to DB2 DBMS, so I wanna a front end client like mysqladmin to speed my process. Is there any?
Any advice would appreciate!
|
|
|
|