How can I change my connection to a different database...it is not connecting to the database I created.

My data is connected to the ASPNETDB.MDF database. Is this a must that I have it connected to this database or can I have it connected to a database that I created.
0
Michael71
1/17/2007 8:53:18 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

4 Replies
1147 Views

Similar Articles

[PageSpeed] 19

You can connect to different database such as sql or other access files.

All you have to do is to define which connection string to use within your web.config file.

If you want to make sure that your database is prepared to be used, use features such as ASPNET_REGSQL.EXE at VS Command Prompt.

Hope this helps.

Jae.


jae.lee@jaeleeandco.com
0
jae
1/17/2007 9:25:57 PM

I'm in the Army...here in Georgia. Is it cold there..

Hi Jae,

        Could you elaborate a little?

0
Michael71
1/17/2007 9:37:29 PM

Sure, let me ask few questions though... this way I will write up some sample code for you.

1. Are you connecting to data using connectionstring is web.config file?
2. Are you adding any other items to data such as membership, user, profile, roles, ...etc?

If you can answer those, I will post a sample code that you can use.

Thanks.

Jae.

ps.  yes... it's very cold here... btw... Army is using ASP.net?


jae.lee@jaeleeandco.com
0
jae
1/17/2007 10:02:45 PM

Yes I'm using data connectionstring is web.config file

yes...I'm adding membership, user, profile, roles

0
Michael71
1/18/2007 7:18:30 PM
Reply:

Similar Artilces:

Database Connection???How to connect a Database in an other server?
How to connect a Database(.mdb) in an other server? Can I use the connection string like below? mycon.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=http://www.****.com/***/mydb.mdb" You can not. That simple. Access is file based. No a client/server architecture.Thomas TomiczekPowerNodes ApS(Microsoft MVP C#/.NET)---Building a Website? Try the PowerNodes CMS - http://www.powernodes.com/ Correction: you can. Just make sure you can reach the acces db file - through a file share that is bound as drive. Not that you should. Performance will be horrib...

How to create a single Oracle Database connection method or function to be used on or by all classes and pages that want to connect to the database?
 How to create a single Oracle Database connection method or function  to be used on or by all classes and pages that want to connect to the database? How can I create one method or function in csharp to be used on all pages or classes when conenction to the database? Please give an example.I have database connections which I am using on each and very page or classes, but I can I put in one page then I just start  calling it?Database connection I am using:   OracleConnection dbconnection;    this.dbconnection = new System.Data.OracleClient.OracleConnec...

can't connect to sql server database with same connection used in visual studio .net 2003
I have the following code that works fine in visual studio .net 2003 but not with VWD.  I have sql server 2000 developer edition installed locally and this connection works fine with visual studio.  With VWD it fails with the exception "System.Data.SqlClient.SqlException: Login failed for user 'DARRELL\ASPNET'".  It fails on the conn.Open line.   any ideas on what the issue is?Dim conn As SqlConnectionDim connstr As Stringconnstr = "Data Source=DARRELL;Initial Catalog=Event;Integrated Security=SSPI;"Dim daEvents As New SqlDataAdapter("select * from events", connstr...

How to create a connection to a sql Database from a database class?
Hello Mate!,                 I have a Database clss and a web form I have just mentioned in the Web config file of the webform for connection string as <configuration> <appSettings/> <connectionStrings>  <add name ="SQL" connectionString="Server=Servername;Database=mydatabase;uid=some user id ;pwd=some password;"/> </connectionStrings ></configuration> and i have just mentioned in a class in which i want to create a connecti...

How can I change the connection with Database?
Hi. I'm new in VWD and I'm working with VWD 2008 Express Edition. I created a report and the all data was created through it (smart tag), everything works fine, but I need change the connection because it is always = "C:/DATA.mdb" and it should be "C:/*whatever*/DATA.mdb" (Dynamic), I don't know where and how can I change this information and if somebody has documents or web sites about XML that will be great. Please, I need help with this. Thanks you can point the DB to your application path if its in web.config. Please check where the conne...

The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database f
 I cannot find the trust level in web.config and cannot get this database to work i need some help real bad. could you please post the connection string which exisits in the current web.configIt seems that you didn't publish your  database correctly Hosam Kamel Remember to click on Mark as answer on the post that helped you    <connectionStrings>    <add name="ConnectionString" connectionString="Server=&#xD;&#xA;p3swhsql-v18.shr.phx3.secureserver.net;Database=DataBaseName;User ID=UserName;Password=password;Trusted...

The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database f
The problem that I am having is that with Visual Web Developer I am creating a webpage and having it directly put online, so for example when I start a new ASP.NET page, I select the location to be HTTP, with the location http://MYWEBSERVER/Website   and for the language and Visual BasicI notice a couple of things, first that there is no longer a a link under the Main toolbar "Website" selection called the ASP.NET configuration.  So how can I configure what I want to have users be able to do?  It seems that this choice is only available if I am building the ASP....

The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database f #2
I have a page (actually a DNN Module) which allows a user, to add other users to a role. (code below) when running the site & clicking the button, I get the error: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file Dim AUTR1 As String Dim AUTR2 As StringAUTR1 = (selectedRole & "2") AUTR2 = (Role1 & selectedWeek) If Roles.RoleExists(AUTR2) = False Then Roles.CreateRole(AUTR2) End If Roles.AddUserToRole(AUT...

The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database f #3
    I'm getting an error when I'm trying to set a value to my profile member. It is working nicely few hours ago. Suddenly I failed to set the value. The error message   The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.   I posting my web.config  <?xml version="1.0"?> <configuration><configSections> <sectionGroup name="system.web.extensions" type="Sy...

Guided Tour - Creating A Database
Hi, I followed the Guided Tour at the section "Creating A Database," but I cannot do this. The problem is when I clicked on the Data tab in the Workspace window, the window displayed an empty data workspace as seen at the tour. However, I did not see the "New Connection" button at the top bar as directed. How can I add this button in for using? Thanks! Vy I had some trouble here too. Try this version of the tour: http://www.asp.net/webmatrix/guidedtour/section2/newconn.aspx the iconography is different -- maybe what you are looking for if you just dow...

Can connect to Database, but how do I insert values into SQL Database?
I was able to connect to the SQL Database Pension with table clients with table values: ID, State, Name.'Create(connection)Dim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)'open connectionconn.Open()However, I'm not sure how to insert a new row with an incremental ID number and a new State and Name.Sorry, I'm really new with VWD. You need to read about ADO.NET before you do anything. Google it.ASP.NET Hosting (HostingFest)...

cannot connect to database when create a COM object
hi, I have a problem when I want to create a COM object using PB Nvo. I create a function and try to connect ASA database, the script is as follow: ----------------------------------------- SQLCA.DBMS = "ODBC" SQLCA.AutoCommit = False SQLCA.DBParm = "ConnectString='DSN=testdb'" connect using sqlca; if sqlca.sqlcode=0 then return 1 else return -1 end if ------------------------------------------------------- But When I call it from asp, it always return -1. Do anyone help me to solve this problem? Thank you. Jason jason wrot...

can't connect to database Too many connection. (URGENT)
Hi All, I've Installed Sybase Adaptive Server Anywhere 6.0, when I connect To the server with more than one client from the same mechine It's OK but when I connect from different mechine I get a message : can't connect to database Too many connection. so can you tell me why and how to solve that problem. Thanks When installling your server, did you type in the correct number of users ? Reinstall the server or stop the server, and run dbclic.exe sofian wrote: > Hi All, > I've Installed Sybase Adaptive Server Anywhere 6.0, > when I connect To ...

Database Explorer not connecting in VWD 2005 express client 'connect to database'
I see red X over the database ASPNETDB.MDF. I went through a config. problem with sql server 2008 express client decided to retun to my original SQL server 2005 express client. This is now configured and I connect to my remote SQL server 2005 account. But I use to be able to connect also with my VWD 2005 express client and I could see all my object files, tables logins etc. it was great, now I can't connect I get this error when I choose data source>MS SQL server/.net framework data provider for SQL server>server name>authority>database name...

Web resources about - How can I change my connection to a different database...it is not connecting to the database I created. - asp.net.object-datasource

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Perth-based man linked to NZ rape cases unmasked after DNA connection
A rape victim has blasted police for refusing to reveal the name of the man linked by DNA evidence to a series of horrific sexual attacks on ...

Ritchie Yorke recounts John Lennon, Yoko Ono connection - The Courier-Mail Search Search
IN THE old-school days of rock ’n’ roll journalism, savvy interviewers got to spend time with interviewees, get to know them, hang out backstage ...

The French connection
A FRENCH-SPEAKING Tasmania is not quite as out-landish a concept as it at first appears, considering we came extremely close to being a French ...

'Who made you Pope?': Donald Trump, Jeb Bush and the Caddyshack connection
The 1980s comedy tells us something about the relationship between Donald Trump and Jeb Bush.

Improved call quality coming to Hangouts for Android via peer-to-peer connection
Improved Hangouts is one of the most common requests from Android users. According to a rumor late last year, Google is working on making it ...

National Journal: Luntz Fails to Disclose Rubio Connection
S.V. Dáte writes at National Journal: "Political junkies who follow Republican messaging guru Frank Luntz know how he felt that Marco Rubio performed ...

Resources last updated: 2/10/2016 10:55:32 PM