Showing posts with label built. Show all posts
Showing posts with label built. Show all posts

Sunday, March 11, 2012

Applying ASP.NET 2.0 to custom pages

Ok I already have a database layed out with several tables and relationships set up, and i went ahead and built a bunch of pages that I was planning on using. While i was doing this I ran into 2 problems, the first was i wrote some SQL statements to insert data from input boxes into some tables i have in my database, i used a catch exception statement as well as a if/else statement to handle the transfer to diffirent pages like a signup succeded or failed, the problem im having is that the data isnt saving into the database. (I was modeling my code after the Video 8 in the Learning SQL server 2005 Express Edition for Beginners Video Series.... I actually got them to work......sorta....) When i test it no exceptions are thrown and it continues on like nothing went wrong. The other Problem i ran into was i realized i wanted to use the memberships and roles provided by ASP.NET 2.0, and since i already created the pages for the site, i was wondering if there was a way to add them in. This site isnt anything fancy at all, i wanted to try and create a app where users sign up and create an account on the site, but i also wanted to have the flexability to insert and retrieve data from the database with out having to be stuck in the templates. Sorry for the long story im trying to give all the info possible. Any help on this would be great! Thanks!

I can understand were you are, but you might get a better answer posting on http://forums.asp.net in the security and membership groups as well as the data access group. Most of the problems or methods that you are describing are general and not just related to SQL Express.

Here is a quick link to Building a simple login system using the asp.net 2.0 login controls in 24 lines of code.

Here is a simple tutorial on Building a simple data layer that might assist your project.

Saturday, February 25, 2012

Application not connecting to DB on restart of PC?

Hi,

i am stuck in a strange situation.
I

have successfully built my application setup through InstallSheild 12.

Which first installs SQL Express user define instance as a

pre-requisite and then install my application files. First time when i

run my application (without restarting the pc), it connects

successfully with user define instance.
But as i restart my PC and try to open my application, it is not connecting with database.
i am using the following command line to install SQL Express 2005 user define instance:

"/qn ADDLOCAL=SQL_Engine INSTANCENAME=MyInstance SECURITYMODE=SQL SAPWD="test" AUTOSTART=1"

if

i change Remote connection to "using both TCP/IP and named pipes"

through "SQL Server Surface Area Configuration" and then restart my pc

again. My application connects successfully with Database.

Please

guide me where i am getting wrong in building setup. do i have to add

something in my command line to not get this error

Please provide more information...

What error are you getting?

How are you connecting to SQL Express? (i.e. connection string)

What is different from the first time you connect at installation and the second time you connect after re-boot?

Are you using ODBC, OLEDB or Shared Memory to connect?

Mike

|||Hi,
thanks for the reply.
i am installing my installer on WinXP machine.
i am using the following connection string to connect with database.

Connection String:
--
Connection.ConnectionString = "packet size=4096;user id=sa;pwd=test; data source = (local)\\MyInstance;initial catalog = MyDB";

Error getting when connecting to SQL Mangmnt Studio:
-
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: Shared Memory Provider, error: 40 -
Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

when first time i install , In "SQL Server Surface Area Configuration" it is checked on "Local Connection Only" and connects successfully.
When i restart my pc and open application it doesnt connect .I open "SQL Server Surface Area Configuration", still "Local Connection Only" is checked but when i check on "using both TCP/IP and named pipes".
and then start my applicaion it connects successfully.|||Hi,
i am using following namespace for connection object.
using System.Data.SqlClient;

Sunday, February 19, 2012

Append String to Value

I'm using SQL Reporting Services 2000 and I've built a pie chart. I'm having
trouble displaying the values in the chart. What I want to do is append a
string to the value that is displayed in the legend. Why doesn't this work?
On the Values tab of Chart Properties -> Data tab -> I double clicked on an
item in the Values listbox.
In the Series label:
= "Fully Patched = " + Sum(Fields!FullyPatched.Value)
In the Value: label:
= Sum(Fields!FullyPatched.Value)
This displays Category 1 in the Legend. The 1 is correct but I'm not sure
where the word Category came from. Also, how do you create a Constant? If
you go to the Edit Expression dialog, You have a choice to choose from
Constants, Globals, ..., but I cannot figure out where to declare and set
these variables.
Thanks,
-ChadOk, I figured out you need to use & instead of +, so:
= Code.strTest & Sum(Fields!FullyPatched.Value) was what I needed.
Now, what about Edit Expression -> Fields: -> Constants? How do I add/use
them?
Thanks,
--Chad