BetaONE will rise again!


Reply
  #1  
Old 5th Jul 05, 06:15 PM
PCTech PCTech is offline
Senior Member
 
Join Date: May 2003
Location: USA
Posts: 362
PCTech is an unknown quantity at this point
Send a message via AIM to PCTech
Access vs. SQL vs. Other DB
Alright, Which database to use for a web app?

Access because I can use MS Access to edit the database? SQL because it can handle many users (how many can it really handle?)? What other database options are there? I really want to use VB.net or C#, aint decieded on which one yet, but I really want to go with a MS product to develop with. I'm really open to any database solution but I also want to plan for the future demand of potentially 1000's of query's from 100+ users very easley with no hit in proformance. Any place to get some code samples for C# and VB.net like a login script? Any other place I can get help, mainly without purchasing one of those 50$ books as I dont have 50$!

~PCT
Reply With Quote
  #2  
Old 6th Jul 05, 11:42 AM
JacKDynne's Avatar
JacKDynne JacKDynne is offline
Administrator
 
Join Date: Oct 2001
Location: The Past Through Tomorrow
Posts: 1,591
JacKDynne will become famous soon enoughJacKDynne will become famous soon enough
Send a message via MSN to JacKDynne
http://www.codeproject.com/csharp/

http://forums.devshed.com/

Lots of examples

/JD
__________________


Reply With Quote
  #3  
Old 6th Jul 05, 04:45 PM
PCTech PCTech is offline
Senior Member
 
Join Date: May 2003
Location: USA
Posts: 362
PCTech is an unknown quantity at this point
Send a message via AIM to PCTech
@JD, the site http://www.codeproject.com/cs/database/sql_in_csharp.asp

answered my question about some SQL and ASP.net Problem I was having with VB.net, at the bottom where it says

Quote:
I know this will work on IIS 6 with Windows 2003 Server because I have done it and that is currently the only OS with IIS 6. On IIS 6 the ASP.NET process runs under the account 'NT AUTHORITY\NETWORK SERVICE'.

osql -E -S %SERVER%\%INSTANCE% -Q "sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'"Now our ASP.NET application will be able to log into the server. Now all thats left is to grant access to the databases.

osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_grantdbaccess 'NT AUTHORITY\NETWORK SERVICE'"osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_addrolemember 'db_owner', 'NT AUTHORITY\NETWORK SERVICE'"These 2 lines will add access to one of the databases. So if you want to add access to another database just change %DATABASE% and run both lines.

IIS 5.1

This should work on all other IIS 5.1 (possibly other versions) combinations. The only difference between IIS 5.1 and IIS 6 is the account the ASP.NET process runs under. IIS 5.1 runs under a %MACHINENAME%\ASPNET where %MACHINENAME% is the machine name.

osql -E -S %SERVER%\%INSTANCE% -Q "sp_grantlogin '%MACHINENAME%\ASPNET'"Now our ASP.NET application will be able to log into the server. Now all thats left is to grant access to the databases.

osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_grantdbaccess '%MACHINENAME%\ASPNET'"osql -E -S %SERVER%\%INSTANCE% -d %DATABASE% -Q "sp_addrolemember 'db_owner', '%MACHINENAME%\ASPNET'"These 2 lines will add access to one of the databases. So if you want to add access to another database just change %DATABASE% and run both lines.
I now know why I was getting the error "unable to login to the sql server" I know damn good and well I had the server running, but I didn't enable access for the user "machinename\aspnet" wow i'm an idiot! I am at work now, so I will see what trouble I can stir up later! thanks again JD for your support

Last edited by PCTech : 6th Jul 05 at 04:47 PM.
Reply With Quote
  #4  
Old 6th Jul 05, 06:20 PM
PCTech PCTech is offline
Senior Member
 
Join Date: May 2003
Location: USA
Posts: 362
PCTech is an unknown quantity at this point
Send a message via AIM to PCTech
Also I have been looking at planetsourcecode.com, and its a useful site, but I really like the devshed a lot better, as it is a forum and there it just seems to be more of a "explain" how it works kinda thing, and you get your answer at the same time so its much better than where I was looking at PSC. I really appreciate the help!
Reply With Quote
  #5  
Old 7th Jul 05, 10:19 AM
JacKDynne's Avatar
JacKDynne JacKDynne is offline
Administrator
 
Join Date: Oct 2001
Location: The Past Through Tomorrow
Posts: 1,591
JacKDynne will become famous soon enoughJacKDynne will become famous soon enough
Send a message via MSN to JacKDynne
You are very welcome PCTech It looks like the commendation should go to you though, I just pointed you in a right direction - you did the research

I like devshed too but haven't had really much time to check it out too often lately

/me is happy to help

/JD
__________________


Reply With Quote
  #6  
Old 7th Jul 05, 02:29 PM
PCTech PCTech is offline
Senior Member
 
Join Date: May 2003
Location: USA
Posts: 362
PCTech is an unknown quantity at this point
Send a message via AIM to PCTech
alright, now I guess I should start a new thread, but sinse its relative to this topic I will post here....

I compiled a simple sql connect aspx page, the example is on the
http://www.codeproject.com/aspnet/SQLConnect.asp


I tried the example, and when I press F5 to run the project (vb.net asp.net webpage) it says something about access denied for user ASPNET, I'm guessing that Visual Studio 2003 doesn't like my beta 2 test copy of VS 2005 with Sql Express 2005?

I guess i'm asking 1 how do I fix it, and I have tried the "osql -E blah blah blah -D "sp_grantlogin '%machinename\ASPNET'" and its says on the command line access denied, and i'm logged in as the administrator. So should I reinstall my OS? I also had SQL Server 2000 installed which I think came with .net 2003, so oh boy maybe I have a conflict with SQL Servers and need to reinstall?
Reply With Quote
  #7  
Old 7th Jul 05, 06:15 PM
JacKDynne's Avatar
JacKDynne JacKDynne is offline
Administrator
 
Join Date: Oct 2001
Location: The Past Through Tomorrow
Posts: 1,591
JacKDynne will become famous soon enoughJacKDynne will become famous soon enough
Send a message via MSN to JacKDynne
http://www.google.com/search?hl=en&q...or+user+ASPNET



/JD
__________________


Reply With Quote
  #8  
Old 7th Jul 05, 07:21 PM
PCTech PCTech is offline
Senior Member
 
Join Date: May 2003
Location: USA
Posts: 362
PCTech is an unknown quantity at this point
Send a message via AIM to PCTech
@JD, what can I say, your the best!

I found 2 solutions, I can either get an Sql Administrator program to add permissions to users, as I can't find the Enterprise manager that "supposedly" was installed with SQL2k5 beta, (i swear it aint there), I am going to google for a free msde administrator progam so I can add permissions to different users like "machinename\aspnet"

then I found the below which I will try using the computer administrator and password
Quote:
Check your web.config file.

Looks like your SQL server is not set up for the correct trusted
connection. What you can do is be specific with the connection string

Change the line in the web.config file from:

<add key="ConnectionString"
value="server=localhost;Trusted_Connection=true;da tabase=portal" />

to:

<add key="ConnectionString" value="server=localhost;user
id=username;password=yourpassword;database=Portal" />

where username is a valid SQL username and yourpassword is the password
for the username.

You can use sa as the username or whatever you need.
Reply With Quote
  #9  
Old 8th Jul 05, 12:03 PM
JacKDynne's Avatar
JacKDynne JacKDynne is offline
Administrator
 
Join Date: Oct 2001
Location: The Past Through Tomorrow
Posts: 1,591
JacKDynne will become famous soon enoughJacKDynne will become famous soon enough
Send a message via MSN to JacKDynne


Glad to help PC

/JD
__________________


Reply With Quote
  #10  
Old 8th Jul 05, 01:50 PM
PCTech PCTech is offline
Senior Member
 
Join Date: May 2003
Location: USA
Posts: 362
PCTech is an unknown quantity at this point
Send a message via AIM to PCTech
i didn't even think to google it first! but I did get a SQL Admin Program w/ a 7 day trial, so I added the database permissions for user "aspnet". I made a program and did the sqlconnection1.open() and then read the connection state and found out that it was open! So I finally got the login to work with sql, now I just have to get some code to make my own login screen!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2000 SP4 enables support for WOW64 NewsBot NeoWin News 0 8th May 05 05:00 PM
SQL Server 2000 SP4 enables support for AMD64 and Itanium NewsBot NeoWin News 0 7th May 05 05:00 PM
Microsoft details SQL Server 2005 family NewsBot ieXbeta News 0 1st Mar 05 02:30 PM
Sun Grants Patent Access to Open Source Community NewsBot NeoWin News 0 26th Jan 05 03:30 PM
Speed up system. greasemonkey Hardware Support 6 6th Nov 01 07:32 PM


All times are GMT +1. The time now is 06:21 PM.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.