Sql Server - App Pointing To Wrong Database

Feb 28, 2011

I've got a web app that uses a MS SQL Server 2008 database. Recently I made two copies of the database, one for ongoing development, the other for users to begin testing and evaluting the application.

I've got two seperate web applications now. I've changed the web.config of the 'test' version to point to the test DB, but it still seems to be using the previous version.

Is this cached somewhere? I've run IISRESET on the box, but the the 'test' version of my web app still seems to point to the wrong DB.

View 3 Replies


Similar Messages:

SQL Server :: Connection String Pointing To A Database On A Different Network?

Jan 3, 2011

I have this following requirement.

My Web Application is hosted on Server A. My Database is hosted on Server B.

Server A and Server B are not on same network. How can i point my connection string to the database in this scenario? Can any one give an example for this kind of Connection String?

View 4 Replies

State Management :: Data Being Saved To Wrong Table In Wrong Instance Of Sqlserver Of Wrong Database?

Aug 1, 2010

I have a weird thing happening. I have two identical databases installed on one virtual machine but under two different instances of SQLServer. For some reason, periodically when saving from one it will save to the other instead. Using debug, I have verified that the connection string is correct and when the item saves, it still saves to the wrong database.I use session variable, and am of the belief that it might have something to do with it...and t hat when I go from one to the other it is still getting the connection string form the other for some reason.To make sure that it isn't a problem, I make sure that I completely close out one database before opening the other in a new IE window.I assume that when I completely close out an internet explorer window that it abandons all session states. Is that true?

View 7 Replies

ADO.NET :: Data Saving To Wrong Database On Wrong Instance Of Sqlserver

Aug 1, 2010

I have a very weird thing happening. I have two databases that have exactly the same tables but different database names on the same virtual machine, but in different instances of SQL Server. For some reason, when using one of them, it will save to the other. In debug, looking at my connection string..I have verified that it is correct, yet when I allow the save, I look in the table and it isn't there, it is in the other database that is in a table with a completely different name and in a different instance of SQL Server.

View 1 Replies

SQL Server :: Inserting Wrong Date In Database

Dec 15, 2010

i am working in the vb.net and inserting the date into DATETIME field sql db. During duging am checking it shows correct date but when insert into db it show "1/1/1900 00:00:00" . I dont know whats the problem. Code:

Dim ObjDob As DateTime = CDate(Me.ddlDates.SelectedValue & "/" & Me.ddlMonths.SelectedValue & "/" & Me.ddlYears.SelectedValue).ToString("dd/MM/yyyy")

View 6 Replies

Asp.net - IIS7 Application Using Wrong SQL Server 2008 Express Database?

Sep 8, 2010

I'm stumped. I have a client site on a virtual private server - Windows Web Server 2008 SP2, IIS7, SQL Server 2008 Express.I'm trying to setup a second web application, to allow him to review updates prior to their going live. I've created the web application in IIS7, and I have added a second database to SQL Server. The second db is essentially a copy of the production db, with 'DEV' prefixed to the database name and a few new fields in a few tables.My production site works fine. However, the test site comes back with an SqlException: "Invalid column name 'version'." This is one of the new fields - which leads me to believe that my dev site is referring to the production database, and not the dev database. Connection strings, however, do point to different databases (although the login is the same for both):

[code]...

View 1 Replies

SQL Server :: Search A Text In The Database Even If User Writes Wrong Spelling?

Dec 11, 2010

i want to search a text in the database even if user writes wrong spelling.

I am using LIKE operator. But I am not getting exact result.

For example: I want to search 'Norrebro' if user types 'Norebro' (wrong spelling)

LIKE operator does not work in this case. So how can I get the exact result??

View 1 Replies

DropDownList Passing Wrong Value To Database Sqlserver

Feb 11, 2010

I'm working with a series of 4 dropdownlists. The First and Third seem to be passing correct values to the database. The second and fourth pass correct value from 0 to 9 but will not pass two digit values. If selected value is 23 the value 1 is sent to database. The four dropdownlists are entered sequentially with other data and sent to database by submit button. All other fields seem to be updating correctly.

The data fields which will not update with two digits are integers. Value 0 to 9 works, 10 to 31 do not. I'm pretty new at this and totally stumped.

View 7 Replies

Access :: Wrong Values Being Input To The Database?

Oct 26, 2010

I have been writing a customer based applicationweb form. In the case "the button" takes information from textboxes and "updates" the Access database with the input. The problem I am running into is that for "LName, Zip, and Phone" -- the program is returning values of zero for only these 3. Here is the code.

protected void Button1_Click(object sender, EventArgs e)
{
string ss = TextBox1.Text;
string fName= TextBox2.Text;
string mName= TextBox3.Text;
string lName = TextBox4.Text;

[Code]....

View 3 Replies

What's Wrong With This SQL Server Query

Jan 15, 2011

What's wrong this T-SQL query :

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True")

[code]...

View 3 Replies

SQL Server :: Stored Procedure Works Wrong When Invoked From C#?

Dec 30, 2010

I have this stored procedure: but everything works fine when i execute it from the managment studio, but when i execute it from my asp.net aplication only update the column "status" but not the column "FAbandono".

I have this stored procedure:

[Code]....

but everything works fine when i execute it from the managment studio, but when i execute it from my asp.net aplication only update the column "status" but not the column "FAbandono".

here is the asp.net code:

[Code]....

View 2 Replies

SQL Server :: DateTime Int The Wrong Format Causing GridView To Not Reconize It?

Oct 13, 2010

I am having a problem with the correct dateTime. Currently I have an application that pumps data into my Microsoft SQL 2005 database. But the dateTime that gets inserted is in the format of, 12 Oct 2010 21:30:24 GMT.How can i change this on the Sql Database on the backend to the correct format?

View 5 Replies

SQL Server :: Try MD5 Hash For (submited Value+table Field) Get The Wrong Answer

Jul 15, 2010

I have two pages:

1) login and send username,password, machineID and a rand string to the server
2) check the machineID whether it exists in the table.

Problem is the checking machine procedure:

select MachineID from computer where MD5MachineID=@MD5MachineID2 and SUBSTRING((master.dbo.fn_varbintohexstr(HASHBYTES('MD5',MachineID+@RString))),3,32)=@MIDST

RString,MD5MachineID2,MIDST are submited by Login MD5MachineID is stored in table.

I need the check if MD5(MachineID+RString) is match the MIDST (submited).

Now the situation is :

if RString is a fixed string(not a variable).like 'abcdefg', the MD5 is correct.

if I use the RString (submited value as a variable), the MD5 is incorrect.

View 1 Replies

Web Forms :: Pressing Enter In TextBox Causes Wrong Server Event?

Aug 6, 2010

I have a few sections in my code with a button to do something different in each. I'm pretty sure the user would press enter to submit the section, but I would like to handle it nonetheless.To handle it, I put the "sections" into Panels, and set the default button for each. There is a total of 4 panels and default buttons set to their respective included buttons.When I press enter in 3 of them, the correct event fires, but not in one (it calls a different button).I put MsgBoxes (for testing) at the beginning of each server event to see which is being called, and it's not the correct one.I might as well post the code, but it's fairly simple. I don't know if the accordion affects it at all, but it doesn't seem like it should...

[Code]....

Sorry, I hate when people post way too long code, but most of it doesn't exactly apply, so just focus on the panels.When I press enter when in focus in on a textbox in BudgetReportsPanel2 and press enter, the
UpdateButton event is called instead.

View 4 Replies

Getting Exception Report - Pointing Bit Of Code

Jan 2, 2011

It doesn't happen often but from time to time I'll get an exception report emailed to me pointing to this bit of code. I'm wondering if you see anything wrong with it:

Csharp Code:
namespace DomainModel.Concrete
{
public class ConfigRepository : IConfigRepository
static mvCmsContext context { get; set; }
public ConfigRepository() { context = new mvCmsContext(); }
private static Func<mvCmsContext, string, Configuration> _byName =
CompiledQuery.Compile((mvCmsContext context, string configName) =>.........................

View 10 Replies

How To Create A New Virtual Directory On The IIS Pointing To Say C

Apr 29, 2010

Assuming here that I have full control over the server.I'm looking for a sample code that would help me understand how to create a new virtual directory on the IIS pointing to say C:

View 4 Replies

Add Google Map In Webpage Pointing To A Location?

Feb 9, 2010

Me with C# asp.net, How can I add google map in one of my web page pointing to a location

View 4 Replies

Two IIS Sites Pointing To Different Folders With The Same Set Of Files?

Oct 21, 2010

We have an application that is currently required to be accessed using two authentication schemes, Forms Auth and Active Directory or NTLM / Windows Auth.The way the application is now, there are two IIS sites pointing to different folders with the same set of files, everything identical except the web.config.Before anyone flames me this was an inherited application, but nevertheless one I am now responsible for. We have an opportunity to do some refactoring and I'm trying to figure out the best way to proceed.

View 1 Replies

C# - Wrong State In Server Controls With Same ID's When Dynamically Adding UserControl To UpdatePanel?

Feb 6, 2010

Here is what I am trying to do. I have a page with two link buttons and an updatepanel (the two linkbuttons trigger the updatepanel). I have two usercontrols which have labels with same ID's. When I click the first link button, I add the first usercontrol to the updatepanel and set the label value to datetime.now

when i click the second link button i add the second usercontrol but i see that the value of the label from the first control is set in the label in second user control. if the id's are different there is no problem - but in my case the usercontrols are being developed by different teams and I am integrating them in the way i mentioned - so they may have same ids.

View 2 Replies

SQL Server :: Insert Data Into Temp Table Will Occurs Wrong Order By Performance?

Jan 3, 2011

i just create table simply like this: create table tblDemo

(
PK_intID int primary key identify(1,1),
intHits int not null

[code]...

View 3 Replies

Data Controls :: DropDownList Is Showing Wrong Data In Selected Value From Database?

Mar 12, 2014

There is a Dropdown(named "Station") in my code.

<asp:DropDownList ID="DStation" runat="server" Width="100%"></asp:DropDownList>

Im fetching the data saved in DB inside dropdown SelectedValue on page load as below:

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

[Code].....

But its always showing "ABC" (i.e, 1st Id's station) in selectedValue of dropdown, for every "id" dont know why.

View 1 Replies

AJAX :: Pointing A Jquery Selector Towards A Dropdownlist Inside An UpdatePanel?

Dec 25, 2010

I'm pointing a jquery selector towards a dropdownlist inside an UpdatePanel. It interacts just fine with the $("#<%= DropDownList1.ClientID %>").change("Do something");

but, when the Dropdownlist postsbacks (it needs to do it, and that's why it's inside the updatepanel) my script suddently stops to work.

View 3 Replies

DataSource Controls :: Pointing To The SqlSelecting Event In The Code Behind SqlConnection?

Jan 26, 2010

I know you can point to a OnSelecting event on the aspx page datasource. But I've created my SqlDataSource in the code behind. Is there any way to point to a selecting event in the code behind (I need this to provide the parameters)? Or should I just include all my logic in the Page_Load event (where I keep my SqlConnection)Here's what I have so far:

protected void Page_Load(object sender, EventArgs e)
{
SqlCommand myCommand = new SqlCommand();

[code]...

View 1 Replies

Web Forms :: Draw Horizontal And Vertical Line Pointing Textbox Across The Page

Jan 3, 2010

Textbox1
Textbox2
Textbox4
Textbox5
Textbox 3
Textbox3

I've one of webform (in design side) has so many textboxes incorborate from one another so , i want to draw line vertically and horizontally acoross the page to point the textboxes

View 1 Replies

Forms Data Controls :: Pointing Button In Gridview To Another Method In Codebehind?

Jul 21, 2010

is it possible to have a button that points to a method you have defined in codebehind, that passes in a record from the row as a parameter? for example, id.something like:

<asp:CommandField ButtonType="Image" EditImageUrl="/editbutton.jpg" ShowEditButton="True" OnClick="editRow(int id)"/>

it wouldnt necessarily 'edit' this row. i'd like it to instead load an editable grid corresponding to the id passed.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved