Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 SQL Server
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dave.
Senior Member

USA
1037 Posts

Posted - 07 November 2003 :  21:54:08  Show Profile
I just Installed SQL Server 2000 on Windows Server 2003 (This is unrelated to Snitz, I'm trying to get another DB set up first). I honestly don't know wht I'm doing, so feel free to tell me I screwed it all up .

I installed SQL Server, then Created a Database called "Users" and a Login Name called "Dave".

I set "Dave" to have permissions to use the Database. From there, I went to another Network computer and used this to connect to the DB Provider=SQLOLEDB;Data Source=SERVER;database=Users;uid=Dave;pwd=xxxxxxx;

SERVER is the computer Name of the Database Server.

I ran this SQL:

SELECT * FROM Dave
Dave is a Table in the Database.

And get this error:


Microsoft OLE DB Provider for SQL Server error '80040e37' 

Invalid object name 'Dave'. 

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 07 November 2003 :  22:41:52  Show Profile  Visit Gremlin's Homepage
Are you 100% certain there is a table called "Dave" in your database ?

If so who is the owner of the database ?

you may need to SELECT * FROM dbo.Dave if the login isn't the owner of the database.

Kiwihosting.Net - The Forum Hosting Specialists

Edited by - Gremlin on 07 November 2003 22:42:16
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 07 November 2003 :  22:49:55  Show Profile
Well, I just upgraded to SP3a, and re-created the DB, I guess I screwed with something when I was trying to set it up.

Thanks, I'm sure I'll have more questions ;)

<- Edit: Oh and uh, it works well now =) />

Edited by - Dave. on 07 November 2003 23:22:35
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 07 November 2003 :  23:28:16  Show Profile  Visit Gremlin's Homepage
Great :)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 08 November 2003 :  00:15:37  Show Profile
Might as well post here rather than start a new topic...

Heres my Code:


        <%
	strSQL = "SELECT USER_NAME FROM " & strTablePrefix & "USERS;"
	RS = Conn.Execute (strSQL)
	%>
	



						<select name="User">
						<% Do until RS.EOF or RS.BOF %>
						<option value="<%= RS("USER_NAME") %>"><%= RS("USER_NAME") %></option>
						<%	RS.MoveNext
						Loop	
						%>
						</select>




I get:

object doesn't support this property or method: 'EOF'

I don't understand, it always worked with Access.

I've removed the non-important stuff, connection, close connection etc.

Any help would be great, TIA =)

Edited by - Dave. on 08 November 2003 00:16:45
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 08 November 2003 :  00:27:01  Show Profile  Visit Gremlin's Homepage
Try

Set RS = Conn.Execute (strSQL)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 08 November 2003 :  00:36:38  Show Profile
Perfect! Thanks a bunch Gremlin :)
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 08 November 2003 :  00:46:20  Show Profile  Visit Gremlin's Homepage

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07