UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Windows Dedicated Server

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 10-03-2007, 20:21
Junior Member
 
Join Date: Mar 2007
Posts: 15
Default

Quote:
Originally Posted by swexpert View Post
Yes, use aspnetdb as database name. Forget the file. However, I am still not being able to login to your database login failed for user gav23.

The next and last possible thing would be to allow me or someone from support access to your control panel. we will try to create a DB and try to connect. If it works, then it will confirm something misconfiguered at your end.

Regds
IJ
Perfect - I actually have nothing in the website except the login files anyway.
Reply With Quote
  #22 (permalink)  
Old 10-03-2007, 20:32
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

Tinkerer, You have created a db named aspnetbd and NOT aspnetdb -> check the spellings.

Regds
IJ
Reply With Quote
  #23 (permalink)  
Old 10-03-2007, 20:53
Junior Member
 
Join Date: Mar 2007
Posts: 15
Default

Thx for that one.

So I changed my connection string to aspnetbd

also changed the ODBC DSN set up for DSN NAME (LocalSqlServer) to correct spelling- not sure if I need this but had one for another database that I did get working

Loaded the web config file & still getting the APP error message

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error


is this because there is nothing in the databse I am trying to connect to - i.e. login page is "looking" for user table (or something like that) but the database is empty because I have not added the tables etc.
Reply With Quote
  #24 (permalink)  
Old 10-03-2007, 21:21
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

Hi,
You should read this:
http:// weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx

Your databasename, login and password are correct. I was able to connect and create a table called students with fields name and age.

Test the following in an asp file:

<%
cst = "Provider=SQLOLEDB;" & _
"Data Source=87.117.201.122;" & _
"Initial Catalog=aspnetbd;" & _
"Network=DBMSSOCN;" & _
"User Id=gav23;" & _
"Password=qw34"

set conn = CreateObject("ADODB.Connection")
conn.open cst

set RS = Conn.Execute("SELECT * FROM students")

If not RS.eof then
RS.movefirst
Do
Response.write "Name:" & RS("Name") & "-- Age-->" & RS("age")
Rs.movenext
Loop until RS.eof
End if

%>


If you can try to connect to database and read this table, then everything is fine at server end and database is setp properly. You just need to check your application's code.

regds
IJ
Reply With Quote
  #25 (permalink)  
Old 10-03-2007, 21:25
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

By the way, remember to send an email to support to get your password changed for the database, once your problem is solved.

Regds
IJ
Reply With Quote
  #26 (permalink)  
Old 10-03-2007, 21:59
Junior Member
 
Join Date: Mar 2007
Posts: 15
Default

Sucess!

I see this:

Name:Tinkerer-- Age-->10Name:Brian-- Age-->22Name:Shelley-- Age-->17

not sure what the:

Provider=SQLOLEDB
Network=DBMSSOCN

bits mean but the other names ip etc I recognise - does that mean I don't need the localhost bit then?

I guess this means that if I could get the membership tables etc in this database that my login might work - is that the case?

I was looking at aspnet_regsql.exe, would I use that to populate the database. I have tried but come back to the error 26 locating server/instance sqlserver does not alow remote connections.

I must say thougg - you do havea great deal of patience for nubbies - thanks
Reply With Quote
  #27 (permalink)  
Old 10-03-2007, 22:16
Junior Member
 
Join Date: Mar 2007
Posts: 15
Default

I tried..

aspnet_reg.exe -S mydomainname -U gav23 -P qw34 -A all -d aspnetbd

and it finished although looking at the file sizes it is about 1/10th the size of that normally created?
Reply With Quote
  #28 (permalink)  
Old 11-03-2007, 06:27
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

"aspnet_reg.exe -S mydomainname -U gav23 -P qw34 -A all -d aspnetbd"

YOU DON'T NEED TO DO THIS!! This is done automatically by the Control Panel when you create a database via the control panel.

You do not need to install and IDEs/Interfaces on the hosting server. Use any other tool to remotely connect to the database but this process will be damn slow. Read the article I had mentioned in the above post.

You could use either the IP Address OR localhost (one of these two). Localhost means the same computer where the script is running, so if you run it on your home computer, it will try to find things on your computer. If you run it from the hosting server, it will try to find them there.

Imagine this:
You live with a friend in an apartment. You write a message on a paper and leave it to your friend. The message says "Get some peanuts from the brown jar in the kitchen and drop them at the baker.". If he reads the message there in tha apartment, he will go to the kitchen and find the jar. But if he takes it to *his* home or any other place and reads it there, he will goto the kitchen and keep looking for the brown jar for sometime and then ultimately say i did not find it. This is the scenario with your application too.

Also, you need to clearly visualize your requirement of "membership tables". IF you wish that certain areas should be accessible only to authorised members, then you need to create a table that stores member ID and his password. Then accept that name and password in a form, read tables from the database (as i did for the exampe) for the entered username and password, if there is a match, show them the content otherwise show invalid user or something.

You are confusing your requirement to something specifically called "Membership Tables" in MS-SQL, which is a different thing, out of the scope of this dicussion.

You need to learn the basics first. Learn how to read and edit data via ASP/VB.NET scripts. If you're comfortable in VB.net, then "deploy" the application instead of copying it. Either way, no one at eukhost will be able to provide you programming support, no host can or does. So you will have to go back to learning school and come back to the playground again.


Regds
Inderjeet
Reply With Quote
  #29 (permalink)  
Old 11-03-2007, 18:35
Junior Member
 
Join Date: Mar 2007
Posts: 15
Smile

Success!!!

It works!

A big thank you to everyone who helped with special thanks to swexpert, thank you Ij.

I finally managed to connect to the server using ms sql server management studio express - I think maybey just being away for the day allowed my head to clear because I could swear I had tried that login 100 times before - but it's electronic & I'm not so I guess I got it wrong.

The other bits - which may or may not be useful to other is that when I had my account reset I forgot to go back and change the ASP.NET from version 1.1 to 2.0 in the scripting section of control panel.

I can now sleep again! (specially since I just used up all my bandwidth trying to get this working) thanks again for all the help.

Tinkerer
Reply With Quote
  #30 (permalink)  
Old 11-03-2007, 20:17
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

you're welcome tinkerer! send me some new hair that will grow now. I'll keep them as a memoir s . Also, you'll get to sleep more if you're a bit careful in typing while coding.

All the best!

Regds
IJ
Reply With Quote
  #31 (permalink)  
Old 14-06-2007, 18:21
new member
 
Join Date: May 2007
Posts: 9
Default further observations - connecting to sql server 2005 express

Hi
Thought I would add some info as I have finally (after a couple of hours or so !) connected to the database within a VPS hosting package.

The connection string is difficult to master as there are so many different options. You don't need to have it in the Web.config by the way - you can manually define the connection string when setting up the sqlconnection object.

The first post in this thread mentions that you must have a connection string with "user instance=true" in it. But this is not supported in ASP.NET (or at least not my version 1.1). I dispensed with it. Basically, after cutting out some other bits I didn't need, I found this worked:

data Source=(servername)\SQLEXPRESS ; Integrated Security=True ; Initial Catalog=(database name)

obviously with the database name and servername set to their respective values.

This does not need impersonation switched on, by the way, and authentication mode is set to "None" in the web config.

Hope this helps someone else save 2 hours or more in their working day!

Cheers
Tyrone
Reply With Quote
  #32 (permalink)  
Old 28-02-2008, 17:58
Junior Member
 
Join Date: Feb 2008
Posts: 10
Default

I see that you are great with sql and I was wondering if there are exploits to a sql server because I have a problem with a fake college.
Reply With Quote
  #33 (permalink)  
Old 29-02-2008, 17:48
Premium Member
 
Join Date: Jan 2007
Posts: 208
Default

tiberiu, Not sure you're referring to whom. That site is selling fake degrees and again not clear from your post whether you are its owner and have some issues with MSSQL or are you having some problem with the sites very existence itself.

Regds
IJ
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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:20.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

knowledgebase articles

popular blog categories