I am trying to build a .NET web application using SQL to query AS400 database. This is my first time encountering the AS400.What do I have to install on my machine (or the AS400 server) inorder to connect?
(IBM iSeries Access for Windows ??)What are the components of the connection string?Where can I find sample codes on building the Data Access Layer using SQL commands?
I am getting a DataTable from query against AS400 database. The field that clearly contains birth dates is interpreted as decimal. I am having trouble even converting it to string.
i want to conncet to rss orignal website if connect is successfully write the rss to xml file and read from orignal website ,else connect failed read xml file (last information in rss original website) and show it how can do it .
and I'm trying to use that to submit to my database, but when I click on the submit button, no data is being inserted into my database, but I'm also not receiving any errors.
I have a UDL file with a connection string in the web.config that my DBML file connects to with no problems. However, I now need to connect to the same file in ADO.NET, and it does not connect.
I moved to ASP.NET from PHP where the queries are run directly. So I always create Connection in the Page_Load Event, dispose it after I do all stuff needed, and access data with NpgsqlCommand. (Yes, I use Postgresql in my ASP.NET applications.)
After starting to learn ASP.NET MVC I was amazed how easy it is to access SQL with the LINQ to SQL thing. But... It works only with MS SQL. So my question is how to implement the same functionality in my applications? How to connect to databases easily?
I wrote my own wrapper classes for connecting to Postgresql. 1 class per a table.
This is a part of the Student class:
[Code]....
So as you see the problem here is that with every INSERT, DELETE, UPDATE request I'm using Connect() method which connects to the database. I didn't realize how stupid it was before I had to wait for 10 minutes to have 500 rows inserted, as there were 500 connections to the database.Using pooling while connecting does help, but still making the connection and making the server check the pool during every single query is stupid.So I decided to move Connection property to a static DB class, and it didn't work either, because it's a really bad idea to store such objects as connections in a static class.I really don't know what to do know. Yes, there's an option of manullay creating the connections in every Page_Load event and close them in the end like I'm doing it right now.
Login failed for user 'NT AUTHORITYNETWORK SERVICE'. 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.xception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYNETWORK SERVICE'. know just this is the problem about connection to SQL Server in C#.NETI don't use any username and password to login to SQL Server
I'm new to WCF web services never done anything with them before and I'm being asked to create a page to connect to a WCF web service I have no idea where to start and I've searched the internet with no success. Does anybody have an example of an asp.net page connecting to a WCF web service? I've set up the WCF web service on my server but do not have a clue on how to actually connect or query it to get my XML data back.
The WCF web service is set up as it's own URL and only has 2 files within the root one being the web.config. I somehow need to query this URL and get some XML data back from it.
I am trying to build a CRM database for my office, but would like to have the ability for users to use it from home as well, and possible an IPhone app to check contact information. I'd like to use WPF, so I could have an application at the office, but also be able to log in at home to the same database, and have multiple users.
Is it possible to have WPF connect to a hosted DB? And possibly have a web form interface, for access through a browser on outside of intranet machines? Or do I need to just go the route of creating a site, and use asp.net and everyone access that through the browser?
This is the code I use to connect to ExchangeServer. My account has 2 mailboxes assigned to it. Could this be the problem? I don't get any bug nor some result.
static void Main(string[] args) { ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); service.Credentials = new NetworkCredential( "{Active Directory ID}", "{Password}", "{Domain Name}" ); service.AutodiscoverUrl("user@domain.com"); FindItemsResults<Item> findResults = service.FindItems( WellKnownFolderName.Inbox, new ItemView(10)); foreach (Item item in findResults.Items) Console.WriteLine(item.Subject); }
I need to connect two ObjectDataSource tags.First will have a query string parameter and the second has a parameter, which is one of the fields in the result set of the first one. The relationship is one-to-one, so I can't put second one in a grid and use control parameter
I have 2 servers. the database server (DB1) which has sqlserver installed and the application server (WEB1) which has my web application. They are both on the same network and both have the same administrator login.
My web application on the application server needs to access the database on the database server. sqlserver is set to mixed mode in security. i created a random sqlserver user login that can only access my database and set it as the db owner. I use the username and password for this in my connection string. when i run my web application i can read information but i cant write to the database. My app is using windows thentication. I have set my NT AUTHORITYNETWORK SERVICE account to db_owner for my database as well... grabbing at straws!
Question 1: When my application talks to sqlserver does it use the administrator login or the NT AUTHORITYNETWORK SERVICE account which i got from using windowsidentity.getcurrent()?
Question 2: If I use ASP.Net impersonation, what does this do exactly? Because if i run the ndowsIdentity.GetCurrent() i get the username that i specified. How does this tie in with my connection string?
Question 3: If I dont use impersonation what and how do i have to configure sqlserver to accept my insert/update requests? Do i need to work with the NT AUTHORITYNETWORK SERVICE? or can i just use my user login? What do i need to add or remove from my connection string? (see below).
i would like to use asax to check my database for every 5 min. if let say the database detect high in threshold.. it will send a notification to administrator. Anyone have done this before mind to share some code?
I just want to be able to connect to a remote MySQL database on my ASP.net c# website running on localhost.
It's so I can grab some records, and insert them into my SQL server database. Do I need to download any drivers? And how do I connect and fetch records?
I have already created the database for my website, however when i create the webforms such as a student sign up form i dont know how to connect the text boxes to the database to its relevant table, so data can be updated and deleted. I am aware of the grid view and form view tools but when using those tools I can't seem to move the labels and text boxes around the webpage for design purposes.
I want connect to SQL Server Compact 4.0 in my ASP.NET application..
Here is example of code:
protected void Page_Load(object sendhttp://stackoverflow.com/questions/asker, EventArgs e) { string connStr = "Data Source=D:\MyDB.sdf;"; string sqlStr = "select * from tblMyTable"; var sqlDataSrc = new SqlDataSource(connStr, sqlStr); GridWithUrls.DataSource = sqlDataSrc; GridWithUrls.DataBind(); }
But I have the next error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server.The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
The SqlDataSource has constructor with three parameters, one of them is 'providerName' so, how to specify that I want definitely use Sql Server Compact provider ? Also I have added System.Data.SqlServerCe reference..