Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Wednesday, March 28, 2012

MS SQL server management studio express

hi there !

Well i hope u all great people are having great time. Well i am new to asp.net and struggling in database deployment to server. I took webhosting from datapacket.net, and using helm control panel. to deploy database, i used sql management studio express as suggested by some one. Now i am not able to access any of database or tables, although i got connected when i altered configuration surface setting to allow server to go to remote server. Now please help me, how to deploy database ?

Thanks

I did not understand you question.

You get connected to the server, but you cannot see the database ? So how do you know you are connected to the server ?

Or

you can connect to the server all of the databases in the server are listed in the object explorer of you Managment studio express and you cannot connect to the database ? If is this option it is probably your credencials.

Are there any errors message ? Can you post them if it is ?

|||

Hi,

Since you haven't give us the detail situation, so I just conclude some of the reasons which is generally happened for you to refer.

From your words, " i got connected when i altered configuration surface setting to allow server to go to remote server", it seems you have connected to the remote database server successfully by your management tool. So I guess, the problem is occurred while connecting to your database in your application. If so, there's nothing related with the deployment of the database. Please do check your connection string which your application use to see if it is working properly.

If the situation is just like after you have uploaded your database onto your server, you can see the database and tables but you can't implement some action such as select,update,delete and etc, then it seems the problem is caused by the wrong setting of database or tables' owners or roles. Just try to find if the role on your SqlServer has the permission to implement these database objects.

Thanks.

Wednesday, March 21, 2012

MS SQL Server 2000: Can Insert New Rows, but can't Update or Delete!!

I'm facing a strange problem here (SQL Server 2000).
I can Insert new rows from My ASP.NET 2.0 Pages but Can't Update or Delete.
usualy I test and build my web applications offline on my home workstation before I uppload them to my Server (Windows Server 2003 Standard), and I make sure that its error free.
The problem goes as follows:
1- I created a data grid that you can insert, delete and update and it worked fine when I tested it on my home computer.
2- When I updated the application to my server, I've noticed that I can Insert new columns to the database but When I try to update or delete the old columns, it doesn't allow me (so I have to use interprise manager to delete them from under- using same username and password!!!!).

I've never faced anything like this before, so please if anyone can give me any advice...

The problem only happened when I was using ASP.NET 2.0 Beta on my Home computer, and the full version on my server. so it was obvious that i need to install the same thing on both computers. but when I did I had to reconfigure my connection to accomodate the changes with the version. and now its working fine...

MS SQL Server 2000: Can Insert New Rows, but can't Update or Delete!!

I'm facing a strange problem here (SQL Server 2000).
I can Insert new rows from My ASP.NET 2.0 Pages but Can't Update or Delete.
usualy I test and build my web applications offline on my home workstation before I uppload them to my Server (Windows Server 2003 Standard), and I make sure that its error free.
The problem goes as follows:
1- I created a data grid that you can insert, delete and update and it worked fine when I tested it on my home computer.
2- When I updated the application to my server, I've noticed that I can Insert new columns to the database but When I try to update or delete the old columns, it doesn't allow me (so I have to use interprise manager to delete them from under- using same username and password!!!!).

I've never faced anything like this before, so please if anyone can give me any advice...

The problem only happened when I was using ASP.NET 2.0 Beta on my Home computer, and the full version on my server. so it was obvious that i need to install the same thing on both computers. but when I did I had to reconfigure my connection to accomodate the changes with the version. and now its working fine...

sql

MS SQL Server 2000, and ASP.NET 2.0 membership controls (login)

when my ASP.NET 2.0 web site working against MS SQL Server 2000,
I Usually have a connection string to the DB, I create a connection, and start working on the data.

While reading about the MemberShip provider of ASP.NET 2.0 (Login control, Forgot password, etc.),
I read that it's possible to save the MDF file of the membership controls, within the APP_DATA folder.

But how can it be ? the MDF file must be at the server folder,
How can I access this MDF file ? with which connection string ?
How does MS SQL Server 2000 syncronize against this MDF file within my APP_DATA folder ?

And by the way, if my hosting company allow me to use 1 db schema of the MS SQL Server 2000 server,
Does this method (saving the MDF file within thr APP_DATA folder) allow me to use multiple schemas ?

Thanks.

Hi,

But how can it be ? the MDF file must be at the server folder

For your first question, the built-in database is a new feature in .NET 2.0 which needs SQLExpress to support. The database is together with your application, you don't need to deploy the database additionally. The MDF file is stored in a folder called APP_DATA. When you application runs, the files in APP_DATA will be shipped as a database with your application automatically.


How can I access this MDF file ? with which connection string ?

If you want to access the database in SQLExpress, you also need connection string to achieve that. By default, the connection string for SQLExpress (built-in database) is located in Machine.Config, the name of the connection string is "LocalSqlServer", and you also can overwrite it and declare it at web.config file, even change the name of the connection string. But what you should note is, don't forget to modify the connection string attribute of the provider so that all the features supported by provider mechanism (i.e. Membership,Profile and etc) can work.

How does MS SQL Server 2000 syncronize against this MDF file within my APP_DATA folder

When you have decided to use SQLExpress to support your provider mechanism application, you don't need to use SQLServer2000. But if you want those provider supported application to work with SQLServer2000. You should use aspnet_regsql tool to transport the ASPNETDB to SQLServer2000 database, and modify the connection string attribute of corresponding provider.

For aspnet_regsql.exe tool, see:http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx

For more information about ASP.NET provider, see:
http://msdn2.microsoft.com/en-us/library/aa478948.aspx

Thanks.

|||

Thanks,

At my development machine :
But I removed SQL Server express from my machine, that means I can't just add the login control, than the MDF file will be created at the APP_DATA,
And everything will be ok ? I must install MS SQL Server express ?

At the hosting server :
There is ms sql server 2000, just copying the MDF data to the AAP_DATA, I guess will not work, right ?
I will need to mograte this MDF file, from my APP_DATA folder, to the real DB, right?

|||

Hi,

But I removed SQL Server express from my machine, that means I can't just add the login control, than the MDF file will be created at the APP_DATA,
And everything will be ok ? I must install MS SQL Server express ?

When you remove your SQLExpress edtion, you still can use such features like membership. (Login controls,CreateUserWizard controls and etc.) But you should export the ASPNETDB in SQLExpress to SQLServer Database before you removing your SQLExpress, and change the membership provider.

There is ms sql server 2000, just copying the MDF data to the AAP_DATA, I guess will not work, right ?

It will not work. To use the database in APP_DATA, you must have SQLExpress installed on your server.

I will need to mograte this MDF file, from my APP_DATA folder, to the real DB, right

Right, you need to export the ASPNETDB.mdf to your SQLServer 2000 database.

Thanks.

|||

Thanks

MS SQL SERVER 2000 INSTALLATION

Hi,
I'm learning ASP.net and I just bought Visual Studio .net professional. I tried to install MS SQL server 2000 on my two computers. One OS is windows server 2003 standard edition and another is Win XP professional.

Both of them appeared SQL Server Upgrade Wizard "from server 6.5 upgrade to server 2000". I don't think I have server 6.5 installed and there is no server 6.5 application interface to run the server. What's the problem? I cannot run the Wizard successfully. Can I just ignore it?
Thank you,
William

Yes ignore it because there is no upgrade from SQL Server 6.5 to 2000, maybe you answered questions Windows asked you about SQL Server please don't answer them. Windows doesnot know any application installed in it, you know SQL Server so ignore any question that is not relevant to you and answer only when you are forced. Hope this helps.|||Thank you for your reply.
It comes another question.
I'm learning Accessing and Binding Data. It's a sample from chapter 9 of the book "MICROSOFT ASP.NET PROGRAMMING WITH MICROSOFT VISUAL BASIC .NET"
I got the error message as followings. I think it is the problem from set up the ASPNET account. I used SQL Enterprise Manager to set up. It looks fine. I feel not. But I don't know how to check it.
And then I tried to open a command prompt and typed in
oSql -S(local)\VSdotNET DE
And Icannot get a 1> prompt.
I got the message:
usage: osql [-U login id] [-P password]
[-S server] ..


Can you let me know where the problem is?

Thank you very much!

Server Error in '/ASPNETSBS/Chapter_09' Application.

Login failed for user 'WILLIAM\ASPNET'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.Data.SqlClient.SqlException: Login failed for user 'WILLIAM\ASPNET'.
Source Error:
Line 31: Line 32: Dim MySqlConn As New SqlConnection(ConnStr)Line 33: MySqlConn.Open()Line 34: TryLine 35: Dim SQL As String

Source File:C:\Microsoft Press\ASPNETSBS\Chapter_09\ExecuteXmlReader.aspx.vb Line:33
Stack Trace:
[SqlException: Login failed for user 'WILLIAM\ASPNET'.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474 System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372 System.Data.SqlClient.SqlConnection.Open() +384 Chapter_09.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Microsoft Press\ASPNETSBS\Chapter_09\ExecuteXmlReader.aspx.vb:33 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032|||First there are two permissions in SQL Server you may have created the database permissions now go to the security section in Enterprise Manager and create the server permissions. Second you connect through the Datalink property at the top of Visual studio not through osql. Try the link below for data bind.
Hope this helps.
http://www.gotdotnet.com/team/vsrapideval/|||Thank you Caddre,
I got some information fromhttp://weblogs.asp.net/coltk/archive/2003/07/10/9920.aspx
So I fixed the problem by following the codes. I'm so happy to make a progress. All of you make the forum great.
William|||I am glad it helped and thanks for the link I know I will need it in the future. Thanks again.

MS SQL Server 2000 Enterprise Edition! Need Help!

hi everyone, i am doing a project on asp.net and i'm want to use the sql server 2000 EE and is using WinXp Pro.
I have problems installing the s/w. It says "Microsoft Server 2000 Enteprise Edition Server Components is not supported on this OS. Only Client components will be available for installation."
Is it true that i can't install SQL Server 2000 EE on XP Pro?
And is it true that i can only use the Standard Edition?

Need Help!
ThanksYes it is true, but you cannot use Standard neither as it needs Server OS as well.

See this page for exact details:
http://www.microsoft.com/sql/evaluation/sysreqs/2000/default.asp|||ok..
thanks very much..|||On WindowsXP Pro, you can either use:

a) MSDE
b) SQL Server Developer Edition (available through MSDN Subscription etc)
c) SQL Server Personal Edition

Cheers
Ken

Edit: oops, didn't scroll down far enough on Teemu's link - personal edition is listed on that page! Sorry for the redundant post.|||u mean the Developer Edition can be downloaded from MSDN?|||If you have an MSDN subscription...

http://msdn.microsoft.com/subscriptions/

Cheers
Ken|||thanks

Monday, March 19, 2012

MS SQL Port

How can I determine which port MS SQL is running.
I known that this can be set at SQL Server Network Utility, but I
wonder why my ASP.NET script can connect to SQL Server even I change
its running port.

Another thing I want to know... actually it doesn't concern with SQL
that is,
how can I watch all the enviroment variable in Windows XP, such as
%systemroot% and how can I set that one"=aKe=" <darkgod1987@.hotmail.com> wrote in message
news:36e545c4.0404140338.6b6e5440@.posting.google.c om...
> How can I determine which port MS SQL is running.
> I known that this can be set at SQL Server Network Utility, but I
> wonder why my ASP.NET script can connect to SQL Server even I change
> its running port.
> Another thing I want to know... actually it doesn't concern with SQL
> that is,
> how can I watch all the enviroment variable in Windows XP, such as
> %systemroot% and how can I set that one

You can look in the SQL Server Log for the port, in the registry, or use the
SQLDMO Registry2 object's TcpPort property.

SQL Server listens on two ports - 1433 and 1434 (by default). A client can
connect to port 1434 to get connection information about all the instances
on the server, inclluding their ports. See "Controlling Net-Libraries and
Communications Addresses" in Books Online.

As for environment variables, you can use SET in the Windows shell, or use
an interface such as WMI which returns all the current variables. WSH has a
built-in object for this, I believe, perhaps the Network object but I'm not
entirely sure.

Simon

Monday, March 12, 2012

MS SQL MSDE Quick Question About Databases

Hey,
Im using MSSQL MSDE with the ASP.NET WebMatrix Project to build databases, but i cant find where the database is stored on my hard drive. I am about to format and reinstall Windows and would like to backup these databases so that i can continue to work with them after i reinstall. Can anyone help me?

Thanks in advance, all help is appreciated :)

E.The quick and dirty answer is to look at C:\Inetpubs\wwwroot. That is where mine were stored. A safer, more complete approach is to simply use a Windows Explorer seach for "My Computer".|||I believe that the default installation location for msde data files is:

\\[yourserver]\c$\Program Files\Microsoft SQL Server\MSSQL$[yourserver]\Data

-Sam

ms sql image + vb.net

Hi,

could anyone help me how to get the images from ms sql database with asp.net (visual basic)?

I have a field in the database with datatype image, and there are a couple of images in this table.

Now I am wondering how to get this images and view them on my .aspx page?

Thank you.I've have solved it.

<%@. Page Language="vb" debug="true" %>
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>
<script runat="server">

Dim u As String

Sub Page_load
u = Request.QueryString("u")
getImage(u)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<script runat=server
Public Sub getImage(ByVal u)

' Create Instance of Connection and Command Object

Dim myConnection As New SqlConnection("Server=localhost;uid=xx;pwd=xx;database=xx")

Dim myCommand As New SqlCommand("Select avatarImage from yaf_user where Name = @.u", myConnection)
myCommand.Parameters.AddWithValue("@.u", u)

Try

myConnection.Open()

Dim myDataReader As SqlDataReader

myDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

Do While (myDataReader.Read())

'Response.ContentType = myDataReader.Item("avatar")
Response.ContentType = "image/gif"
Response.BinaryWrite(myDataReader.Item("avatarImage"))

Loop

myConnection.Close()

Response.Write("Person info successfully retrieved!")

Catch SQLexc As SqlException

Response.Write("Read Failed : " & SQLexc.ToString())

End Try

End Sub

</script>
</body>
</html

Friday, March 9, 2012

MS SQL and ASP.NET connection problem

Hi,

Im trying to set up a ASP.NET webform to a MS SQL database. Im currently databinding to a datagrid. My code seems to compile correctly, no errors, however the data does not display.

I have tried to connect to the database server using the data adapter preview and works perfectly. But once i get the webpage running nothing displays from my VB code.

Does anyone have any clue to a resolution? THANK YOU ALL!I don't know if this is the problem, but I think after setting the datagrid's datasource property to the dataset, you have to type this:
"datagrid1.bind" or maybe "datagrid1.databind" (one of them: I can't quite remember)

Hope this helps.
Wes

Wednesday, March 7, 2012

MS SQL 2005: Performance – normal CPU vs CPU DUO/4 CORE

Hello,Is performance of web application (ASP.NET + SQL Server 2005 Wrg edition + Win Server 2003 Web edition) running on server with one core duo/4 CPU generally comparable to the performance of the same application running on the same server with 2/4 physical CPU's?Thank you for your ideas!Jan

Hi Jan,

Of cource on a multiple core CPU, the ASP.NET and SQL Server performance will be better than a single core CPU.

Because the IIS and SQL Server will optimize the performance according to the core units. In this case, better performance is gain.

MS Sql 2005 Master DB sysprocess with ASP

I am having issue trying to obtain data from a query to MS SQL 2005 master database using a ASP to view the information. When I use management studio and run this query, I get the correct result.

Code: ( text )

  1. select hostname, count(*) from master.sys.sysprocesses group by hostname

When trying to implement this to write out to a asp page, the result is the machine that is hitting the DB and nothing more. This works for a MS SQL 2000 but why doesn't it work for 2005. Here is the ado snippt I am using to connect to the DB using DSN.

Code: ( text )

  1. Set objConn = server.CreateObject("ADODB.Connection")

  2. objConn.Open "dbserver", "user", "password"

  3. strSQL = "select hostname, count(*) as ""Connection"" from master..sysprocesses (nolock) group by hostname order by ""Connection"" desc"

  4. Set sqlData = objConn.Execute(strSQL)

What error do you get?
It occurs on objConn.Open, or on objConn.Execute?|||The odd thing is, I am not getting any Errors.
The page works but it doesn't show the correct information.
What it shows is the web machine that is accessing the sql 2005 machine.|||

Quote:

Originally Posted by rvl1980

The odd thing is, I am not getting any Errors.
The page works but it doesn't show the correct information.
What it shows is the web machine that is accessing the sql 2005 machine.


This is what I get from 2000 and 2005 sql from my asp.

From MS SQL 2000 using asp to display
Host Num of Connection(s)
Server123 118
WSX0160 90

From MS SQL 2005 using asp to display
Host Num of Connection(s)
TRACKING 1|||I guess there no help with this?

Monday, February 20, 2012

MS RS Reportviewer, sparklines and bullet graphs in the report.

Hello All,

For a new reporting project compact we are using MS Reporting Services and hosting the report in an ASP.NET reportviewer.

"Tufte-like" and very clean, simple data visualizations as sparklines and bullet graphs have become a requirement.

We've had some success redering these in ASP but it's become necessary to render them in the reports themselves and we have not found a good way to do it.
Even third party charting products do not seem to support RS very much, one that does requires it on top of analysis services and their sparklines are actually defined in the KPI-s, but we are not using AS.

Have any of you had reports inspired by Tufte or Few and implemented it,
how did you manage it?

as always, your help is greatly appreciated!

Edward Tufte reports!!! Great way to go!

I did some a while back - basically, take a regular column chart and strip away everything from it:

Chart Area - no border/line, no fill
Plot Area - no border/line, no fill
Axis - no labels, no scales, no tickmarks
No Legend
The Palette doesn't have enough options, but the default is best

If you are doing comparisons against, say regions or products, create a separate column chart for each. Keep them the same scale, and lined up (stacked).

You really can do a lot of nice Sparklines using SSRS.

Good luck.