Jump to content
Xtreme .Net Talk

Recommended Posts

  • Administrators
Posted

You don't. MDB are access database files. If you want to create a new database for msde you can do it through server explorer in VS.Net or via code you can use the CREATE DATABASE command

CREATE DATABASE  
ON  ( NAME = ,
 FILENAME = ,
 SIZE = 10,    
MAXSIZE = 20,    
FILEGROWTH = 5 )
 LOG ON ( NAME = ,
 FILENAME = ,   
 SIZE = 5MB,    
MAXSIZE = 25MB,
 FILEGROWTH = 5MB )

 

where the logical name parts are identifies used inside MSDE and the physical paths are the actual filenames on disk - the directory specified must exist but the file itself shouldn't. By convention the database filename edns with a .mdf extension and the log with a .ldf.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted (edited)

hey,

:( unfortunately i dont have a "Server Explorer" in vs.net

but, where would i type in the code?

 

thanks for the reply

 

edit: actually, the program from www.msde.biz comes with a compiler :-D, thanks for the replies

Edited by ThePentiumGuy

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

  • Administrators
Posted
hey,

:( unfortunately i dont have a "Server Explorer" in vs.net

but, where would i type in the code?

 

thanks for the reply

 

edit: actually, the program from www.msde.biz comes with a compiler :-D, thanks for the replies

Are you sure you don't have one? What version of VS are you running? If you look on the view menu server explorer should be the 3rd or 4th item down.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

thanks i found it :), sorry about that

 

- however, although my msde is connected(looking at the taskbar icon)

whenever i try to browse through the server explorer i get:

 

The underlying connection was closed: Unable to connect to the remote server.

i think its becuase im using "Windows NT authentication",

 

from scratch, heres what i did:

i went to file | create new project, and i went to "other projects" and clicked 'database application'

 

i wasnt too sure what to provide for the server name(as there was nothing on the list)

then i provided my user("sa" is the user by default ) and password, but when i went to 'test connection' it said:

 

Login Failed for the user "sa". Reason: Not associated with a trusted SQL server connection.

i beleive that i may not have installed MSDE correctly, i installed it with the parameters

that a memeber, "Answer", submitted:

setup.exe INSTANCENAME=VSDotNET SAPWD=<MyPassword> SECURITYMODE=SQL

 

am i doing something wrong? Sorry for seeming like such a stubborn jerk, im new to Databases, so forgive my additude

 

thanks for your replies,

pent

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

  • Administrators
Posted

MSDE is probably set to only use windows authentication and as such will not allow you to login as 'sa'.

You can grant permissions to the aspnet account and then create a user in the database

 sp_grantlogin '\ASPNET'
 use 
 sp_grantdbaccess '\ASPNET','ASPNET'
 

and then on the create connection tab go for windows authentication

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

(quick q, i accidentally closed out of the MSDE icon in my task bar, and in order to actually connect to the program provided by MSDE.BIZ,i need to be connected the database, how do i bring it back?)

 

thanks for hte help

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Posted

actrually never mind lol, i restarted and i got it back again :-)

 

i tried running your code

sp_grantlogin 'HP\ASPNET' use hi.mdf sp_grantdbaccess 'HP\ASPNET','ASPNET'

(quick q, why ASPNET?)

 

i got this:

Error on Server:, Source:.Net SqlClient Data Provider

 

Class:16, Msg 911, State 1, Line 1

 

Could not locate entry in sysdatabases for database 'hi'. No entry found with that name. Make sure that the name is entered correctly.

 

hi.mdf <-- whwere should i put that file? becuase it cant find it appearently

 

thanks,

-pent-

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Posted

- after about an hour or so of messing around, i finally got it to work with VS.NET

:-) :-) :-)

 

thanks a LOT for your help guys,

the problem was, when i "Added connection" , i needed to (for the server name) type in "ComputerName/InstanceName" <-- i kept forgetting the instance name

 

thakns guys,

pent

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...