Thursday, March 22, 2012
ASP Programming Question (build a calendar and connect with SQL Se
I wish to build an ASP calendar table and when I click on the calendar
specific date, it will automatically add the date into the SQL Server table.
The table must be in Year, month and date
--
regards seowhuaHi
Please visit at http://www.aspfaq.com/show.asp?id=2519 written by Aaron
"seowhua" <seowhua@.discussions.microsoft.com> wrote in message
news:3552695A-4AF2-4AE9-9AA6-8723A1B33230@.microsoft.com...
> Hi anyone,
> I wish to build an ASP calendar table and when I click on the calendar
> specific date, it will automatically add the date into the SQL Server
> table.
> The table must be in Year, month and date
> --
> regards seowhua
ASP Calender...
Can I know how can I build the calender. Normally a calender image will
shown besides the date text box. When we click on it,a calender will pop up
and if we select a value from it, the date will be inserted in the
corresponding text area.
TQ
--
regards seowhuaI think you might be in the wrong newsgroups. This is the SQL group :)
Now, if you want a table to store a calendar :)
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"seowhua" <seowhua@.discussions.microsoft.com> wrote in message
news:51073539-0E05-4FB8-B932-CDCFB7444B31@.microsoft.com...
> Hi,
> Can I know how can I build the calender. Normally a calender image will
> shown besides the date text box. When we click on it,a calender will pop
> up
> and if we select a value from it, the date will be inserted in the
> corresponding text area.
> TQ
> --
> regards seowhua
Tuesday, March 20, 2012
ASP + reporting services
eg. on a button click, the report should be run and emailed.
can someone please help me out.
thanks!Edit: Sorry! Gotta watch which link I'm hitting!!
ASP .NET Web Site Administration Tool Problem
Hi,
I have a problem when I use ASP .NET Web Application Administration tool. When I click the Security tab, I receive following message
"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem:Unable to connect to SQL Server database."
In the same page, there is a button to go to Provider section. I clicked it, and I went to the Provider page. There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider. There, there was a link, I clicked it and I receive following message:
"
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
"
After reading this message, I opened Command Prompt and went to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727. There, I ran the aspnet_regsql command, and then ASP .NET SQL Server Setup Wizard was displayed. In the first page of this wizard I chose "Configure SQL Server for application services" and then I clicked "Next" button. In the second page I left all fields as they were and then I clicke"Next". In the third page I only clicked "Next" and then some process ran. Finally, in the last page I received following message:
"
Setup failed.
Exception:
Unable to connect to SQL Server database.
------------
Details of failure
------------
System.Web.HttpException: Unable to connect to SQL Server database. --> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
-- End of inner exception stack trace --
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()
"
What should I do? I tried to use this administration tool on computer in my house and everything was just fine. Why do I have this problem in my office?
Hi,
It seems that you are not providing correct information about your SQL Server database on second page of that wizard. It should be properly pointing to the database which would be used by your application. When you have properly pointed it to that, it will then create some default tables and objects for you to use and enable this feature in your application.
|||Yes, you are right! I made a mistake in step 2 of ASP .NET SQL Server Setup Wizard. Recently, I successfully went through all the steps. However, I still can't open the Security tab in ASP .NET Web Site Administration Tool. When I open the Provider section, I still receive the message below:
"
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
"
What should I do? I need to create a login functionality for my site in near future. Please help me...
|||
Hi haris101,
There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider.
Open your machine.config and search for "localsqlserver" connection string. The default is configured to use sql server express database. So, if you are not using sql express, you need to modify this "localsqlserver" connection string or specify a new connection string for the default provider.
I suggestion you read this walk-through first:http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx
Hope my suggestion helps
|||hey haris
im having the same problem -
i can get the web site to run queries
but i cant get the website administration to connect
did you ever find out the solution??
would love to know your experience
thanks
toy
|||
I'm also having a similar problem, I tried to connect the aspnet_regsql to my sql 2005 server on the network but it keeps telling me it can't connect. and i'm not sure why that is. I already have information for my web app stored in this server so i know that it is running just fine. if anyone can help that would be great, im running the vs 2005 pro with the 2.0 framework.
Thank,
Shane S.
FDOT
Bo Chen – MSFT:
Hi haris101,
There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider.Open your machine.config and search for "localsqlserver" connection string. The default is configured to use sql server express database. So, if you are not using sql express, you need to modify this "localsqlserver" connection string or specify a new connection string for the default provider.
I suggestion you read this walk-through first:http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx
Hope my suggestion helps
Thanks Bo! You are right!
For others who experience the same problem like mine, all you have to do is modify machine.config file in ...\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG (this is the default location). Scroll down until you find
<connectionStrings> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>
What I did is changing the connection string to "Data Source=IT-HARIS\SQLEXPRESS;Integrated Security=True" since "IT-HARIS\SQLEXPRESS" is my SQL Server name and I use windows authentication to log on to this server. I hope this works for you too.
Best regards,
Haris
asking for SQL query
how to format it to a query
i have the sample fo the following table:
ID trans_desc trans_date
-------------
1 testing 1/9/2003 11:33:00 AM
2 testing1 2/9/2003 11:33:00 AM
3 testing2 1/9/2004 11:33:00 AM
how to i extract the transaction description month from the month Jan-Feb . how to i do for the SQL queryIf there are 50 people on this forum, you'll get 50 different ways to do this. Here is one:
declare @.SelectedDate datetime
set @.SelectedDate = '2003-02-15'
select *
from YourTable
where trans_date >= convert(char(4), @.SelectedDate, 120)+'-01-01'
and trans_date < dateadd(month, 1, convert(char(7), @.SelectedDate, 120)+'-01')
Sunday, February 12, 2012
Are these indexes?
In EM, when I click the Database, the right pane shows 3
tabs and under the Tab "Table Info" it shows info on the
table and shows the names of the indexes, but it also
shows names like this with an index grapic next to it:
_WA_sys_Attr_300424B4
What is this? It's not an index that I've created.
Thx,
DonHi Don
No, it's not an index and doesn't take storage space like an index. Is is
just statistics on an unindexed column which can be useful for the optimizer
when coming up with a good plan.
You can read about statistics in the Books Online.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Don" <anonymous@.discussions.microsoft.com> wrote in message
news:03d501c4a02b$049889c0$a401280a@.phx.gbl...
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>|||Hi,
These are statistics (name start with _WA) and are not indexes. If
you have auto create statistics on option set for the database and query on
a column that column has no index then sql server will create the statistic
for that column start with the name _WA_SYS_.
Thanks
Hari
MCDBA
"Don" wrote:
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>
Are these indexes?
In EM, when I click the Database, the right pane shows 3
tabs and under the Tab "Table Info" it shows info on the
table and shows the names of the indexes, but it also
shows names like this with an index grapic next to it:
_WA_sys_Attr_300424B4
What is this? It's not an index that I've created.
Thx,
Don
Hi Don
No, it's not an index and doesn't take storage space like an index. Is is
just statistics on an unindexed column which can be useful for the optimizer
when coming up with a good plan.
You can read about statistics in the Books Online.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Don" <anonymous@.discussions.microsoft.com> wrote in message
news:03d501c4a02b$049889c0$a401280a@.phx.gbl...
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>
|||Hi,
These are statistics (name start with _WA) and are not indexes. If
you have auto create statistics on option set for the database and query on
a column that column has no index then sql server will create the statistic
for that column start with the name _WA_SYS_.
Thanks
Hari
MCDBA
"Don" wrote:
> SQL 2000
> In EM, when I click the Database, the right pane shows 3
> tabs and under the Tab "Table Info" it shows info on the
> table and shows the names of the indexes, but it also
> shows names like this with an index grapic next to it:
> _WA_sys_Attr_300424B4
> What is this? It's not an index that I've created.
> Thx,
> Don
>