DataSource Controls :: Running On Different Computer - Path Will Auto Change

Jul 26, 2010

I created a DataSet(right-click project-->add new item-->DataSet) and then a TableAdaptor to it with table from database. However, when i bring the project to others computer and run, it has error.

I look into the DataSet in xml and found that the path to database is actually on the computer that created the DataSet(C:DOCUMENTS AND SETTINGSUSERDESKTOPPROJECT NAMEAPP_DATADATABASENAME.MDF)

My database file is located at the App_data folder. May i know is there a way to config so that whenever i run the project on different computer, the path will auto change?

View 2 Replies


Similar Messages:

WCF / ASMX :: Deploying Running Test Webservice On Localhost Development Computer?

Dec 30, 2010

I created a simple web service in VS2010 (C# - XP Professional SP3 development computer -- running .Net 3.5/4.0) that just does the basic "Hello World" and changes Temperatues from Farenhet to Celcius functions and ran fine in VS2010. I then created a directory in C:Inetpubwwwrootwebsvcvs10a (of the same development computer). In the localhost IIS I converted this to an application directory (properties/create application). I tried to deploy my web service here using the publish wizard of VS2010 but was getting errors stating that the URL was not in the correct format, so I decided to just copy myService1.asmx, Web.Config, and the bin folder (which contains the compiled assembly) directly to C:Inetpubwwwrootwebsvcvs10a. Then from the localhost IIS I tried to browse myService1.asmx and received the following error:

Configuration Error
Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error: [Code]....

Source File: c:inetpubwwwrootwebsvcvs10aweb.config Line: 6

Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

--I tried changing the targetFramework to 3.5 in web.config, but that did not fix the problem. I then removed the targetFramework attribute from web.config and then got this error message:

Could not load file or assembly 'myVS2010Websvc' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'myVS2010Websvc' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

What can I / should I do to resolve this problem so that I can deploy this web service project to localhost -- don't I already have .Net 4.0 runtime on this machine? It is the same machine that is running VS2010.

View 2 Replies

DataSet Connection Path / When Bring The Project To Others Computer And Run, It Has Error?

Jul 26, 2010

I created a DataSet(right-click project-->add new item-->DataSet) and then a TableAdaptor to it with table from database. However, when i bring the project to others computer and run, it has error.I look into the DataSet in xml and found that the path to database is actually on the computer that created the DataSet(C:DOCUMENTS AND SETTINGSUSERDESKTOPPROJECT NAMEAPP_DATADATABASENAME.MDF) My database file is located at the App_data folder. May i know is there a way to config so that whenever i run the project on different computer, the path will auto change??

View 19 Replies

DataSource Controls :: Facing Alot Of Sql Deadlock In My Event Handle On Server Computer?

Jan 18, 2010

I would like to know how deadlock is happen, i have facing alot of sql deadlock in my event handle on server computer.

View 3 Replies

Web Forms :: Extra URL Path Running The Site?

May 27, 2010

[URL] Does anyone know why is generating this strange folder path?

View 2 Replies

Forms Data Controls :: How To Change The First Column Of Auto Generated Columns Of A Gridview

Oct 15, 2010

I have a gridview which makes use of a datasource. The columns are auto-generated.

Right now, my task is to make the first column into a url column. Does anybody know how to do it?

View 3 Replies

DataSource Controls :: Linq To Sql Auto Generated Value?

Mar 12, 2010

In a database table, let's say I have a non-null field named "Description" with a default value of (''). If I drag this table onto the .dbml view in Visual Studio and click on the Description field, the properties will indicate that the Auto Generated Value is set to false, thus ignoring my default value of (''). This is fine, as long as I always explicitly set a value for Description when I perform an insert/update, but I ran into a problem today when I tried to do an insert without specifying a value for Description: Cannot insert NULL value into Description. The default value I set for the field was being ignored. To try and fix this error, I went back into the .dbml and set Auto Generated Value to true, and tried again - no error this time, but the data I tried to insert was ignored, and the default value, (''), was inserted instead. I do not want to explicitly set every field to a default value programmatically when I perform inserts. Is there any other way to resolve this issue other than making the fields nullable?

View 3 Replies

DataSource Controls :: Re - Auto Generate ID'S In Sqlserver?

Jun 27, 2010

I really need to create ID like this. But I don't know how use this Procedure .If you don't mind can you explain to me step by step how to use to procedure for create auto ID in database. (Should I call to this Procedure from somewhere else, like webpage button or something)

View 4 Replies

DataSource Controls :: Get Next Auto Increment Value From Table?

Apr 28, 2010

i have a question, suppose i have a table 'tblImage' which have 3 rows of data and my auto increment is not +1.

imageId imageName
1 a.gif
2 b.gif
4 c.gif

i want to query '2' using LINQ C# to the table in MS SQL and show the record which i have done easily BUT now i want to get the next auto incremented value to make Next button on the sane web form, which is in this case is '4' and i also want the previous imageId as well.

View 5 Replies

DataSource Controls :: Getting An Auto-increment Field To Work In SQL

Feb 11, 2010

I'm trying to get an IDENTITY column to auto-increment with each new row inserted, so that the field (userid in this case) can be used as a unique identifier.

However, I'm getting this error:

[Code]....

My code looks like this:

[Code]....

I don't understand - if I have to explicitly insert something into my auto-increment column, how do I know what to insert? Isn't the point of an auto-increment column that it's... auto?

View 7 Replies

DataSource Controls :: How To Auto Generate Data In Database

Apr 6, 2010

I am having a field called Semester, i will enter it as 1 initially. Then it should automatically increase 1 semester every six months till sixth semester in the database (sql server 2005) is it possible?

View 5 Replies

DataSource Controls :: Auto Email Sending In 30 Days?

May 7, 2010

i need a small help in stored procedure, Its about automatic email remainder to the officer,i have two fields in the table one is status and another field is date of which when that status filed in the database.assume if the status is 1 for 30 days and not changed in 30 days from the date i need to send an email from stored procedure.

i sended a mail from stored procedure succesfully but the prob is i dont know to set remainder for 30 days.

View 6 Replies

DataSource Controls :: How To Get Customized Auto Generated ID In Sqlserver

Jun 24, 2010

I am using Sqlserver2008.

I want to konw how to get TransactionID(customized auto generated number) with 9dgits(2 alphabets, 7 numerics).

[Code].....

View 2 Replies

DataSource Controls :: Sending Auto Mail From MS SQL SERVER?

Feb 27, 2010

I need to send auto mails from MS SQL server,

WE hosted our site in shared Hosing account in Lunar pages. when I try to send mail from the MS SQL server. I am getting error like access denied. They not allow me to access the 'sys' database . i am unable to send the email from ms sql server.

Q1. Is any body sending mail from shared hosting server?

Q2. how can i send mails from this case? Is their any way to send Email from ms sql server with the minimum user privillege

My error details in server:

Msg 229, Level 14, State 5, Line number 1 EXECUTE permission denied on object 'sp_OACreate', database 'mssqlsystemresource', schema 'sys'.

Msg 229, Level 14, State 5, Line number 1 EXECUTE permission denied on object 'sp_OASetProperty', database 'mssqlsystemresource', schema 'sys'.

View 1 Replies

DataSource Controls :: Update Db Before Running Code

Dec 21, 2010

i need to get my listview there are made on a LinqDataSource to update the db before it running my code i have made in my update botton. how do i force the update to happen ind c# ? my code in my update botton looks like this

protected void UpdateButton_Click(object sender, EventArgs e)

View 2 Replies

How To View A Web Page Served From One Computer From Another Computer

Jan 31, 2011

I am running a website from IIS on one computer and I want to view the web page on another computer. the only way I can do this is by using the ipaddress of the computer with IIS on it but would rather have a url. How can I generate a url or use a domain name from [URL]. I signed up for an account on that website but dont know how to use it. I dont know how to configure it.

View 2 Replies

DataSource Controls :: Auto-Update Column Whenever Record Is Updated?

Feb 9, 2010

Is there a way I can automatically update a 'Date' column in my database table to the current date whenever any cell in that record is updated?I've started looking into table triggers a little bit and I'm wondering whether I can do it using this?

View 1 Replies

DataSource Controls :: Create An Auto Incrementing ID For Table Rows?

Apr 27, 2010

I have an ID column (int) in my table which also needs to be a unique key.

last time I worked with a database (BD2), I set this as an autoIncrement feild and it would automaticaly 'deal with it' (ie, maintain the last used value somewhere and automaticaly used that value (after incrementing it) for any new row on the table).

How do I handle this in ASP.NET. Especially, as I try to add a new line based on form content when the user presses on a button (C#).

View 7 Replies

DataSource Controls :: Running Sql Server Management Studio?

Aug 11, 2010

I am having a problem connecting to my SQL Server 2008 Express database with SQL Management Studio Express and from the website at the same time.

Everytime I want to view any pages in my site that access the database, I have to close management studio and restart the server for some reason or i get a failed login error message. Then when I want to go back to SSMS I get this error message:

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

Additional Information: Unable to open the physical file c:..... Operating system error 32: "32(The process cannot access the file because it is being used by another process.)" (Microsoft SQL Server, Error: 5120)

Is it NOT possible to work on the database through SSMS at the same time as viewing pages in the website that access the database?

I sure hope that there is a work around or something for this.

Just in case my connection string is:

<add name="ApplicationServices" connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />

View 5 Replies

DataSource Controls :: SQL Server Express 2008 Not Running?

May 6, 2010

After reimaging my hard drive, I reinstalled SQL Server Express 2008, this time using the Windows Platform Installer for the first time. Tried running websites within VS2008 and VS2010 and can't connect to database. Tried to turn on using Sql Server Config Manager. Won't turn on. Also tried to connect via Sql Server Management Studio 2008, but got this error:

A network-related or instance specific error occured....the server was not found or was not accessable.

View 3 Replies

DataSource Controls :: Obtain Inserted Table Row Identity With An Auto Increment Key

Feb 18, 2010

I am using LINQ to store and retrieve data from tables with a clustered index key. However, I also need to know how to obtain an inserted table row identity with an auto-increment Primary key. The "Go To Definition" feature for my data context of dataClassesDataContext provides the following information:

[System.Data.Linq.Mapping.DatabaseAttribute(Name="EFMDB")]
public partial class DataClassesDataContext : System.Data.Linq.DataContext

I am asking for the C# code that is needed in a button click event handler that will insert a row of data in a table named "Fields". It only consists of an auto-incrementing primary key column (FieldID), a string column (Phrase) and a null defaulted variable column.

View 3 Replies

DataSource Controls :: Auto Complete - Get Keywords From Full Text Catalog?

May 30, 2010

This is my first time using autocomplete. I have everything up and running, but I want to return a list of more relevent keywords or phrases from my full text catalog, or the table that I search against. I have no idea where to start as far as my getcompletionlist goes.

So If I type in knee
a list appears
kneepads

here's my getCompletionList
Public Function GetCompletionList(ByVal prefixText As String, ByVal count As Integer) As String()
Dim items As New List(Of String)
Dim myConnectionString As String
myConnectionString = GetSQLConnString()
Dim mySelectQuery As String = "SELECT ShortDescription FROM ProductInfo WHERE FREETEXT(ShortDescription, @prefixText) OR FREETEXT(LongDescription, @prefixText) OR FREETEXT(ProductHTML, @prefixText) OR FREETEXT(PartNumber, @prefixText) ORDER BY RANK()
OVER (Order BY PartNumber, ShortDescription, LongDescription)"

[Code]....

View 2 Replies

DataSource Controls :: Running SQL Query From SQL Management Studio - Optimize?

Jun 29, 2010

I have one query which is not responding even after 4 minutes. But same query is when called from asp.net pages (though stored procedure), responds within 10 seconds. My Query:

[Code]....

I don't want to know the ways to optimize the query as I have already changed the query and now it responds within fraction of second. I just want to know that, why it was not reponding after 4 minutes in SQL Management Studio and responds in just 10 seconds when run from asp.net through stored procedure. I am using SQL 2008 Express with Advanced services and .NET 3.5.

View 4 Replies

DataSource Controls :: Advanced SQL Query - Drive Running Out Of Space

Jan 25, 2010

I have a query which is returning records like below which returns a list of tasks with a corresponding task type. there is a task table (wh_task) and a task type table (wh_task_type). What i want to achieve is a count of all the tickets per ticket type. So at the end of the query i will have a total for Administration / Maintenance tasks (1) and a total for Routine Maintenance Tasks (3). ** and all the other types *

There are many different types of task type so I dont want to have to hard code it. Can count all the occurencies of the different ticket types.

Task Name
Task Type
Date Completed
SBS Server C drive running out of space
Administration / Maintenance
16/07/2007 16:03:34
Patching Server(s).
Routine Maintenance
08/01/2009 06:51:56
Patching Server(s).
Routine Maintenance
11/02/2009 10:06:06
Patching Server(s).
Routine Maintenance
04/05/2009 06:53:24

I can also get wh_task_type_id.

Here is my SQL:

[Code]....

View 8 Replies

DataSource Controls :: Calling Long Running SQL Procedure From UI - Workaround?

Jun 16, 2010

I have a site that calls a long running stored procedure that eventually times out the UI. The procedure simply runs some logic in the database, and kicks of a secondary process. No data is ever returned to the UI, so I don't need the UI to wait for anything.Is there a way to call the stored procedure from the UI and move on without having the UI having to wait for the store procedure to complete?

View 4 Replies







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