Accessing Database Data In ASP.NET 2.0 - Best Practices?

Dec 31, 2007

I was wondering if you guys know of a good site that talks about programmatically accessing and displaying data from a sql server 05 database in ASP.NET 2.0.
I want to have a data adapter in a dataset, but I would like to create my own class file and pull the data from the adapter through code into the class. Is this the best way? Im wondering about the best practices while learning this new technology. Any articles provided would be appreciated.
 
Thanks!

View 2 Replies


ADVERTISEMENT

Best Practices For Accessing A Sql 2005 Db On The SAME Box As IIS 6.0 Serving Asp.net 2.0

May 17, 2007

I am re-posting this from the security Forum where it remains un-answered.

OK, Here's the set up.

I have a Windows 2003 box, soon to have SSL installed

On it is IIS 6.0, SQL 2005 Standard Edition (5Cal user lic)



SOON I'll have a prod enviornemnt where a web app being served by IIS is accessing SQL. I can go into SQL and set up a user account, call it MyAppSQLAcess, and code that into the connectionn string and lock it down to the tables/db it has access to. Or I can do it w/windows authentication, or I can do it a number of other ways, the question is this:

What is the best way for an asp.net app being server by IIS 6.0 to access data from SQL 2005 server when they are all on the same BOX? WRT Speed and security?



Thanks



Dan

View 2 Replies View Related

Database Insert Question - Best Practices For Empty Data

Apr 17, 2007

I am making a form that takes input for 1 to 5 students using VWD.  With the help of previous posts I have been able to make the database insert query work properly.  In my form I have a radio list that has the user select if they are entering information for 1, 2, 3,4, or 5 children.  Depending on how many children are selected on the radio list, I am displaying the proper number of textboxes and validating the data using the handy RequiredFieldValidator.  Now I am at the point where I want to perform the instert to the database depending on the selected number of children in the family.  What is the general rule for best  practices. Please keep in mind that it is my understanding that ALL fileds in a SQL insert statment must have data. Should I ...1) create alternative SQL statements depending on the textboxes displayed OR2) is it more common to insert a standard string or integer, depending on the datatype, into the unused textboxes to populate the unused fields? Sincerely,Mike 

View 2 Replies View Related

Accessing Data In Different Database

Jan 22, 2007

Hello Everyone,
  Is it possible to write a query that can access data in differnt database so I have "trainee" and "training" databases. In want to access one training  table in trainee database through a query. How can I  do this.
 
Thanks.

View 1 Replies View Related

Accessing Data Structure Of A MS SQL Database

Mar 19, 2008

I have written 5 content-management systems and am getting a little bored writing a lot of the same functionality and tweaking it for different datamodels.  Is there a way within .NET to have visibility of a database's structure (ie, data type, column names, foreign keys etc)?  I'd like to write up a dynamically generated form for any given table, displaying appropriate form controls based on data type and foreign keys.

View 7 Replies View Related

Best Practices Database Owner, Database Connection Method (asp)

Sep 18, 2007

Hi-I have a sql server database, and am wring web apps to access it.I've created databases different ways, and ended up with different owners (eg dbo, nt authorityetwork services...)I also have connection strings using windows authentication, and some using a user name and password.I have read that using windows authentication is the best way to go, as far as security goes, but I have noticed some connectivity issues when I upload the site to the server, and test it remotely. What is the safest 'owner' of the database, and what's the safest way to connect?Thanks Dan 

View 8 Replies View Related

Best Practices For SQL Data Access

Nov 1, 2007

Hi,
i am newbie in ASP.net world. i am using 3 tier application architechture for my web based application. data base is sql server 2000. i have looked at object and sql datasource objects but i think they are not suitable for my requirements. so i am planning to directly use ado.net to access data from database.( i.e. creating connection, then creating commands n executing them)
now what i am looking for is the best known practices for the above task. i have following solutions in my mind please let me know if i am missing some or which could be the best aproach.


careate one class which will handle all the database requests so that all the pages and business objects request that class to to do all the db related stuff. (creating connection, command n execution)

View 4 Replies View Related

Rqst For Inventory Database Best Practices

Jan 30, 2006

I am developing an inventory database in SQL Server. I realize there aremany commercial (as well as some non-commercial) inventory offerings, but myclient has specific requirements that would necessitate significantcustomization of any off-the-shelf application. In the end, we decided itwould be more feasible to build one to our specifications.What I am looking for are a list of best practices/recommendations for thearchitecture and modeling of an inventory database. This inventoryapplication will be for managing a wholesale products operation. It mustmanage purchase orders to the manufacturer of the products, sales invoicesfor the retail customers of the products, as well as manage product stocklevels in the warehouse. We will need a number of reports, including:1. What products are in stock.2. What products are on order from the manufacturer.3. What products are needed to fulfill outstanding sales.4. Warehouse operations (e.g., receipt of delivery, inspection, add toinventory, pull from inventory, packing lists, invoices, return toinventory, etc.)5. Sales analysis (e.g., product velocity, sales by associate, etc.)My main question is regarding the managing of products in stock. As I see itthere are three ways of accomplishing this:1. Track only transactions (products received, products shipped, etc.) andcalculate the stock based on the sum of all transactions. But as transactionvolume accumulates over time, this would get very slow and cumbersome.2. Have a table of "units in stock" and add and subtract to it astransactions occur. This has the advantage of always providing an instantsnapshot of inventory levels. But it makes it more difficult to managechanges or corrections to a transaction once it has been entered.3. A combination of the above two concepts. Choose a point in time (forexample, when the warehouse inventory is audited) and capture that in a(semi) "static" table. After that, transactions are summed as needed againstthose static numbers. The next time the warehouse is audited, the "static"table is updated and all prior transactions are archived. New transactionsare once again summed against the most recent audit numbers. Of course, thiswould mean halting operations at the time of the audit (probably not anissue for my client's business).Recommendations? Suggestions? Comments?(Btw, I've tried to find this info in books and online, but so far have notfound anything that makes specific inventory system design recommendations.If you know of a good reference, please let me know.)Thanks in advance!Michael

View 4 Replies View Related

Best Practices/Provider Connecting To An Oracle Database?

Jun 22, 2007

Are there generalized best practices with regards to which method/provider to use when accessing an Oracle database? I have used both the "Native OLE DBMicrosoft OLE DB Provider for Oracle" and the "Native OLE DBOracle Provider for OLE DB" and both seem to have their own quirks (requirement to convert to Unicode, etc) but I also have heard that I shouldn't be using an "OLE DB" source at all, but to set it up as an ADO .Net connection.

We are just beginning to implement SSIS, and are trying to establish Best Practices/Standards etc.

Are there any gotchas - performance and/or otherwise I should know about?



Thanks in advance!

View 1 Replies View Related

Bulk Inserts To Data Warehouse - Best Practices?

Jul 20, 2005

Hello all,I just started a new job this week and they complain about the length oftime it takes to load data into their data warehouse,which they do once a month.From what I can gather, they rebuild the indexes before the insert with an80% Fillfactor, then insert the data (with theindexes enabled), then rebuild the indexes with a 100% Fillfactor.Most of my RDBMS experience is with a different product. We would havedisabled the indexes and Foreign Keys, loaded the data, thenre-enabled them, moving any records that violated the constraints into anappropriate audit table to be checked after.Can someone share with me what the accepted "best practices" are for loadingdata efficiently into a data warehouse?Any thoughts would be deeply appreciated.Steve

View 2 Replies View Related

Built-in Data Types In SQL Express: Best Practices?

Jul 21, 2006

Greetings,



I think these should be rather simple questions, yet I spent a number of hours last night digging through the forums here and msdn and couldn't find any satisfactory answers. Basically, there tend to be types of information that are commonly saved in most databases, like names, addresses, phone numbers, email addresses, etc...and there are a variety of built in data types in SQL Server. What are the best built in datatypes for some of the common entries in a sql database. Also, there are a number of character based types and I am curious why one would be more useful in certain situations than another. Why is there char( ), nchar( ), varchar( ), nvarchar( ) and text datatypes? Why so many? Also, what is the "text" datatype and when is it most likely to be used? There is very little about the text type that I can find in the msdn or SQL Server docs...aside from the fact that it's text. On top of all this, there's numerous binary types as well. I'm really not getting the reason behind all these different basic types and why I would want to use one over the other in any specific instance.



TIA,

Mark



View 14 Replies View Related

Dumb Question: Best Practices To Validate Data Columns

Aug 15, 2007

[This is one of those cases where I think I know the answer, but I hope I'm wrong!]

I have a data flow which is processing data from the XML Source. There are 16 outputs from the XML Source. I have to perform a variety of validations on these outputs: things like "column 1 is required if column 2 has value 'a' or 'b'", or "column 1 or column 2 may be present, but not both".

For lookups and such, I use the Lookup component and its error output, both to redirect rows that fail the lookup, and to capture the data, column number and error code.

But, how do I do the same for "normal" validations?

If I have to use the Conditional Split transform, then I'll have to have one output per validation, and use a Union All to combine the rows again for output to an error file. This will also cost an extra "Derived Column" transform per output, in order to get a column number and possible error code per failed validation.


Worse, it's a pain to have to maintain all the columns in such a large "Union All"!

If I had the time, I might write a "Conditional Error" transform. It might be fun. But I have to be done by the end of this month, and don't even have time to create the UI for evaluating expressions!

Any tips or tricks or pointers to such would be very welcome.

View 9 Replies View Related

Better Practices Wanted For Cascading Inserts Of Hierarchical Data From Staging Tables

Aug 28, 2007

I apologize if this has been asked, but I can't find a complete answer.

We have a situation with parent/child tables which have an identity column as their PK. We need to be able to insert into the live tables from staging tables. The data in the staging tables are related via a surrogate key.

I have found the OUTPUT clause, but that can only refer to columns of the actual table (since there is no FROM clause in an INSERT). Our current best solution to this problem involves adding bogus "staging" columns to the destination tables, and removing them after we've inserted everything from staging. This is an unattractive solution to say the least.

I'll give an example that mirrors our actual solution, and ask if anyone has a better solution?
----------




Code Snippet
CREATE TABLE [dbo].[TABLE_A](
[ID] [int] IDENTITY(1,1) NOT NULL,
[DATA] [nchar](10) NOT NULL,
[STAGING_COLUMN] [bigint] NULL,
CONSTRAINT [PK_TABLE_A] PRIMARY KEY ([ID] ASC)
)
GO
CREATE TABLE [dbo].[TABLE_B](
[ID] [int] IDENTITY(1,1) NOT NULL,
[A_ID] [int] NOT NULL,
[DATA] [nchar](10) NOT NULL,
[STAGING_COLUMN] [bigint] NULL,
CONSTRAINT [PK_TABLE_B] PRIMARY KEY ([ID] ASC)
)
GO
ALTER TABLE [dbo].[TABLE_B]
ADD CONSTRAINT [FK_TABLE_A_TABLE_B] FOREIGN KEY([A_ID]) REFERENCES [dbo].[TABLE_A] ([ID])
GO
CREATE TABLE [dbo].[STAGE_TABLE_A](
[A_Key] [bigint] NOT NULL,
[DATA] [nchar](10) NOT NULL
)
GO
CREATE TABLE [dbo].[STAGE_TABLE_B](
[B_Key] [bigint] NOT NULL,
[DATA] [nchar](10) NOT NULL,
[A_Key] [bigint] NOT NULL
)
GO


The STAGING_COLUMN columns are the ones that will be added before, and dropped after.






Code Snippet
DECLARE @TABLE_A_MAP TABLE (
A_ID INT,
A_Key BIGINT
)
INSERT INTO TABLE_A (DATA, STAGING_COLUMN)
OUTPUT INSERTED.ID, INSERTED.STAGING_COLUMN INTO @TABLE_A_MAP
SELECT DATA, A_Key FROM STAGE_TABLE_A
INSERT INTO TABLE_B (A_ID, DATA)
SELECT TAM.A_ID, STB.DATA
FROM STAGE_TABLE_B STB INNER JOIN @TABLE_A_MAP TAM ON TAM.A_Key = STB.A_Key






This seems to work, but I'd really like another alternative. Even though this is happening when nobody else is using the database, I cringe at the thought of adding and removing columns just to make this work.

Here are a few of my constraints:



The above is a simplification of the actual problem. The actual problem goes about five levels deep (hence the B_Key in STAGE_TABLE_B). At the top level, our larger customer will have 100,000 rows to insert. Each level will average 3 times as many rows as the next higher level, so we're talking about real volumes here.

This has to finish over the course of a weekend.

This has to be delivered to QA this Friday
Thanks for any help or insight.

View 3 Replies View Related

I Am Accessing Data Using Data Access Pages In IIS 7 To SQL Server 2005 Authentication Is Failing

Feb 5, 2007

is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.

I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?

I expect to set up a username for each database as i setup new customers.

View 1 Replies View Related

Data Access :: Users Get Wrong Data Records - Cross Coupling When Accessing Files From MVC App

Aug 7, 2015

I have an MVC asp.net application that stores many records in a table on sql server, in its own system.  used the system for 2 months, worked fine accessing, changing data.

Now that other users are logging in? there is cross coupling going on.  one user gets the data from another users sql search.

In the mvc app it had used the get async method to read the ID record from the db, i set that to synchronous.  no effect;  the user makes their own login id but that does nt matter either.

View 8 Replies View Related

Accessing Tables Of A Different Database From The Current Database

Apr 15, 2008



Hi,

In a stored procedure is there a way of accessing a table presend in another database.

Please provide pointers on how i can do this.

Thanks,
Raj

View 4 Replies View Related

Help With Accessing Database

May 25, 2007

Hello,



I just switched to a host that allows database connections so that I can now upload my database to their server.



When I test my site on my personal PC it works great. I upload everything to the server and nothing. I know that I need to load the database to the server. I have Microsoft SQL Server 2005 Express and can make the connection but how do i load my database from my personal PC to the host computer?



I would be greatful if someone was able to walk me thou the steps on how to transfer the database. I am really very new with the database thing and ASP.



Thank You



Chris

View 1 Replies View Related

Accessing Database Users

Feb 8, 2007

Hi,
 I would like to know if there is any way of Accessing database users from frontend and changing their persmissions.
Thanks
Niranjana. 
 

View 10 Replies View Related

Accessing A Database From Another Project

Aug 30, 2007

 Hay there,I have an asp.net project website with an sql Database. I need to access this same database from another project (a class library that needs to access this database). In fact i want to be able to use the tableadapters that I have implemented for  my database in this new class library.. I guess it has to do something with making my database not part of the website but and independemt entitiy that can be seen by others..... I cannot seem to find a way to do that can anyone help meee ????Thanks for your time! 

View 6 Replies View Related

Accessing Database Problem

Oct 24, 2007

Hello friends when I am working in VWD and accessing sql data this error came?I am using asp.net visual web developer edition and sql server 2005 expressedition.  plz check it  out and help me.The log scan number (588:85:1) passed to log scan in database
'D:GCAPAPP_DATAGRIET_IT.MDF' is not valid. This error may indicate data
corruption or that the log file (.ldf) does not match the data file (.mdf). If
this error occurred during replication, re-create the publication. Otherwise,
restore from backup if the problem results in a failure during startup.
Could not open new database 'D:GCAPAPP_DATAGRIET_IT.MDF'. CREATE DATABASE
is aborted.An attempt to attach an auto-named database for file
D:GCAPApp_DataGRIET_IT.mdf failed. A database with the same name exists, or
specified file cannot be opened, or it is located on UNC share.
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.Data.SqlClient.SqlException: The log scan number (588:85:1) passed to
log scan in database 'D:GCAPAPP_DATAGRIET_IT.MDF' is not valid. This error
may indicate data corruption or that the log file (.ldf) does not match the data
file (.mdf). If this error occurred during replication, re-create the
publication. Otherwise, restore from backup if the problem results in a failure
during startup. Could not open new database 'D:GCAPAPP_DATAGRIET_IT.MDF'.
CREATE DATABASE is aborted.An attempt to attach an auto-named database for
file D:GCAPApp_DataGRIET_IT.mdf failed. A database with the same name exists,
or specified file cannot be opened, or it is located on UNC
share.Source Error:



An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:



[SqlException (0x80131904): The log scan number (588:85:1) passed to log scan in database 'D:GCAPAPP_DATAGRIET_IT.MDF' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. Could not open new database 'D:GCAPAPP_DATAGRIET_IT.MDF'. CREATE DATABASE is aborted.An attempt to attach an auto-named database for file D:GCAPApp_DataGRIET_IT.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2406 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +223 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +371 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +184 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +501 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +510 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89 System.Data.SqlClient.SqlConnection.Open() +159 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +118 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +82 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1653 System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +82 System.Web.UI.WebControls.ListControl.PerformSelect() +18 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +68 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +61 System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26 System.Web.UI.Control.PreRenderRecursiveInternal() +88 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5684

Version Information: Microsoft .NET Framework Version:2.0.50727.832;
ASP.NET Version:2.0.50727.832

View 1 Replies View Related

Problem In Accessing The Database.. Please Help!!

Oct 14, 2004

Hi There !!

CAn you please help me to solve my probelm and i will appreciate it if you help me. I installed SQL server on my machine and i installed tables in a database called "otters" when i run the application, i got an error message on the browser as shown below although in the application it says that it recognise the source of the dastabase. CAn you please help me to sort out tis problem and please try to look back to this thread after givingf me the soultion as it might not work and i need more assistant. I really, appreciate your help and thank you in advance. Please read the error message below
**************************************************

Server Error in '/Otters' Application.
--------------------------------------------------------------------------------

SQL Server does not exist or access denied.
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.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Source Error:


Line 403: Dim conn As New SqlConnection(connStr)
Line 404: cmd.Connection = conn
Line 405: conn.Open()
Line 406:
Line 407: ' Allocate an empty array list to hold the performance objects found


Source File: C:CSE506TheaterPerformance.vb Line: 405

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
Theater.Performance.Find(SqlCommand cmd) in C:CSE506TheaterPerformance.vb:405
Theater.Performance.FindByDateRange(DateTime st, DateTime et) in C:CSE506TheaterPerformance.vb:369
Otters.admin.Page_Load(Object sender, EventArgs e) in C:InetpubwwwrootOtterssecureadmin.aspx.vb:67
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET

--------------------------------------------------------------------------------

View 7 Replies View Related

Remotely Accessing Database

Oct 15, 2004

I'm developing a VB app to manipulate data in a table. I've created an SQL server (local) and have successfully connected to and manipulated data in a database that I created. I would like to be able to run the app on another machine and connect to the same server. I'm having trouble determining what the server name is. Tried a few things but get the "server does not exist" message. Server is set to authenticate SQL server and windows.

Is this happening because my server is (local)? If so how do I change it to permit remote access?

Any assistance would be appreciated.

View 2 Replies View Related

Tutorial; Accessing MS SQL Database Using C++!

Jul 20, 2005

hey!Im looking for a db tutoral which covers accessing a Microsoft SQL databaseon windows. I will be using VC++ if it matters. NO details just a basicintroduction!Oracle DB access using C++ is also of interest!Thanks!-- Majk

View 1 Replies View Related

Accessing An Existing Database

Jan 23, 2008

I have a MSSQL database from a pre-existing app. The data files do not have an MDF exension, they have a .dat extension. I can however use Microsoft SQL Server Management Studio Express to run queries against the files, but I can not get VB 2005 to connect. When I attemp to add it as a project data source, I get the following error:

"An attempt to attach an auto-named database for file c:dataMSSQL$DATA_SQL....dat* failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

*Database names = company names are omitted to 'protect the innocent'.

Does anyone have any ideas? Since Microsoft SQL Server Management Studio Express worked so cleanly with the database I was expecting to easily get to the same data using VB.

View 5 Replies View Related

Accessing My Database From Home

Feb 29, 2008

Hi,

I have an sql express server which contains a single database. Three users access this database using a C# application I have writen. I use Integrated Security for these three users.

The problem is that one of my users wishes to use my application from home.

What are my options in letting this user use my application from home?

Thanks for your help,

Barry.

View 1 Replies View Related

Accessing A Database File

Sep 5, 2006

Hi,

I'm a hobby C# programmer, and when at university there are a few machines that have SQL Server 2005 installed on them (i think it's standard ed).

From looking around at sql 2005 free edition and DNN (dot net nuke) it's apparently possible to have the database file in the execution directory of your application.

My question is this, if i have a C# win app, is in possible for me to store the database files, in the executable directory of that app, and not in the default sql database store of C:prog filessql server90 data etc...?

Ie, what i want to do, is for the C# win application on start up to "mount" the database, use it normally like any other sql database, and then "unmount" it at the end.

The reason for "mounting" and "unmounting" is that i don't want the database to be accessible or even visible to sql server when the c# app isnt running.

I hope I've explained myself clearly, and thanks a lot in advance.
pro-logic

View 3 Replies View Related

Accessing Another Database On The Same Server

Aug 10, 2006



Let's assume we have 2 databases db1 & db2

and we have a table named "MyTable" which is located in db2 database

in the db1 database I create a stored procedure by using following code:

<<

use db1

create procedure myproc

as begin

select * from db2.dbo.MyTable

end;

>>

this code does not execute successfuly and I face an error which says << invalid object db2.dbo.MyTable>>

and as you know we are not allowed to use USE database key word in stored procedures

I can's access a table which is located in another database, whithin a stored procedure which is located in different data base but on the same server

thanks



View 3 Replies View Related

Accessing Data In A Column

Oct 18, 2006

I have a SQLDataSource returning data for a formview.  This should be a simple question that I cannot find an answer to.  The SQLDataSource is returning only one row of data.  How do I access the value of one of the columns?Thanks for the information.

View 3 Replies View Related

Code For Accessing Data

Jan 3, 2008

Does anyone have code to access data? I want to create a sqldatasource control on the page, but would like to programmatically/manually/code-behind-wise to fill in my queries and their parameters. Thanks! 

View 6 Replies View Related

Accessing Data From The SQLDataSource.

Apr 5, 2008

I am using a drap and drop SQLDataSource control.  Everything works like I am wanting it to, but I want to check a value from one of the fields that I have retrieved.  I am lost as how to retreive just the field.  If I have to create another dataset to do the work what is the point of using the drag and drop control?  I would really like to just access the dataset fields as needed.

View 2 Replies View Related

Accessing Data In One Field

Jun 20, 2008

There has to be a better way (less code) to grab the data in one field than:string sql0 = "Select PSI from agentRate where agent='" + agent + "'";
SqlCommand command0 = new SqlCommand(sql0, conn2);SqlDataReader dr0 = command0.ExecuteReader();
string PSI="";while (dr0.Read())
{PSI = (string)dr0["PSI"];
}
dr0.Close();
 
Any Thoughts?

View 4 Replies View Related

About Accessing Data From Sqlserver

Sep 15, 2005

Hello sir,I have installed .net1.1version on windows2003 operating system.I have also installed sqlserver2000  on the same system.My problem is that when i am trying to get data from sqlserver from asp.net program i am getting error as 'access denied to user NT AUTHORITY/NETWORK USER'.I request you to kindly suggest me with an appropriate solution.Thanking you.Please email me on:-aanandkumar786@yahoo.com

View 1 Replies View Related

Accessing Data Across 6.5 Servers

Jun 22, 1999

Hi,

I need to access data across my sql servers . All the servers are 6.5. Think MS DTC is the solution. But how to implement the same. Can somebody give me step by step instructions.

Thanks in Advance.

Cheers

View 1 Replies View Related







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