473,671 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005


ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005
---------------------------------------------------------------------------------------------------

I have successfully created a webservice in ASP.NET 2.0 C# with VS
2005 & VS 2008, however, i can find nothing - books or otherwise to
help with the webservice connection to the database.

Can anyone please offer help on what to return in the method that
makes a select statement to the database and HOW to connect to the
database?? Do i use DataSets, TableAdapters, drivers???

How??
Jun 27 '08 #1
1 2125

"Wendi Turner" <we*********@gm ail.comwrote in message
news:7f******** *************** ***********@q27 g2000prf.google groups.com...
>
ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005
---------------------------------------------------------------------------------------------------

I have successfully created a webservice in ASP.NET 2.0 C# with VS
2005 & VS 2008, however, i can find nothing - books or otherwise to
help with the webservice connection to the database.

Can anyone please offer help on what to return in the method that
makes a select statement to the database and HOW to connect to the
database?? Do i use DataSets, TableAdapters, drivers???

How??
One question. Do you have an currently running web site that uses SQL
Server? If you do then you connect the same within the webservice as you do
in the web site.

Depending on what you want to do you can use datasets etc or just execute to
get a datareader or a scalar value.

LS

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2706
by: Bamse | last post by:
Hi all, The problem is as follows: I need to authorize a user: through a WS; if a setting is on, the webservice will look in the local "database", if the setting is off it will connect to the server ip that is set in the configuration and call the same WS to check the user in the remote "database". So far I don't know if I can call a webservice method from a webservice method...
6
10073
by: Carlos Lozano | last post by:
Hi, as a background I have an Windows application developed with VS 2003 (c#) that needs to transfer securely data to a MySQL database located on a Linux server. I have created a PHP webservice that will receive an xml file with all the data to update an encrypted database. This way all database logic will remain on the Linux server. The web service works OK using a testing PHP client.
2
1888
by: Franklin M. Gauer III | last post by:
I create a simple DATAADAPTER in a webservice project. It creates the UPDATE, INSERT, DELETE commands for me - no problem. In vS2005 it creates these commands as RESOURCES in the RESX file (i.e. strings). The problem is whenever I try to test the webservice I get: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure...
0
2608
by: Larry Rebich | last post by:
I am trying to use the sample web template that is distributed with Visual Studio 2005 called 'Personal Web Site Starter Kit'. After running for awhile it fails with the following message: ------------------------------------------ Server Error in '/PersonalWebSiteStarter' Application. -------------------------------------------------------------------------------- An error has occurred while establishing a connection to the server. ...
3
2232
by: adi | last post by:
Hi I only have this situation at one of my client's site. I install the webservice setup prog. Usually, i may access the asmx file from an IE browser. Not this time. My webservice uses .NET Framework 1.1 The machine is an Windows Server 2003 Standard Edition. The IIS and WWW service is up & running; also run "aspnet_regiis -i" command to make sure IIS is registered with dotnet.
6
4353
by: Steve Ricketts | last post by:
I have a webservice written in VB.net that opens a connection to SQL Server 2000 with a connection string. The connection remains open for the life of the web service so the ADODB.connection is defined as public and used by a single subroutine, SQLexecute. All recordset definitions are defined in the individual subroutines and destroyed before exit of the subroutine. I would expect only one connection to be made to the SQL Server but...
8
2830
by: BD | last post by:
I am developing C# win form app to work with remote database on SQL Server 2005. Problem scenario is as follows: 1. a form is open that has downloaded dataset to local cache 2. computer is put into stand-by or hibernation 3. later, computer is brought out of stand-by or hibernation 4. when trying to save or close form, SQL exception comes up (remote system closed conn) I know this relates to connection pooling, but I am having a...
0
1324
by: Wendi Turner | last post by:
ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005 --------------------------------------------------------------------------------------------------- I have successfully created a webservice in ASP.NET 2.0 C# with VS 2005 & VS 2008, however, i can find nothing - books or otherwise to help with the webservice connection to the database. Can anyone please offer help on what to return in the method that makes a select...
2
3829
by: Wendi Turner | last post by:
ASP.NET 2.0 C# WebService Connect to Database: Sql Server 2005 --------------------------------------------------------------------------------------------------- I have successfully created a webservice in ASP.NET 2.0 C# with VS 2005 & VS 2008, however, i can find nothing - books or otherwise to help with the webservice connection to the database. Can anyone please offer help on what to return in the method that makes a select...
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8821
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6229
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2812
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.