VS 2010 Connecting To SQL Database From Windows Form Application?
Aug 5, 2010
I had another thread on this problem but I wanted to start this one so no one had to look at the code I posted in the other thread. I have a successful connection but want to display data from the SQL database on my website in my Windows form application. Here's the code I have so far. Used some of the ADONET Tutorial1 here. The table Ray Rover Activation has a number of different columns but to start out I just wanted to see if I could display data for the EmailAddress column.
If I comment out the Sub DoStuff I don't get any errors but neither is anything displayed other than the messagebox message. If I don't comment out DoStuff then I get an error, "Incorrect syntax near the keyword 'FROM'". Maybe someone could enlighten me some on what I need to do get the data in the column EmailAddress to display.
My website is [URL] (access there to see error, please) When I was testing in VS2010, it was connecting to the DB because I set permissions READ/WRITE on my computer to ALL. If I put restrictions, VS2010 couldn't just connect to them. Well, I deployed my DB on the server of my website, and I'm not able to access it.
My connection string:
connection = New SqlConnection("Data Source=.SQLEXPRESS; Integrated Security=True;AttachDbFilename=|DataDirectory|Visitas.mdf")
I think I'm getting these errors because my server hasn't permission to access the database.
I have all my tables and queries in online DB ie., i have created all my tables and queries in online using third party site [URL] Now i want to make connect my application (which is in my system) with that database
I am writing a web service for a customer. I tested it locally fine using a consumer, but he is having an issue calling it from his jquery, so he asked for logging.I figured I would use the Windows Event Log for this purpose. after I added the event log and was testing it locally via the consumer, I had an error saying The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. So what I did to solve that was restart Visual Studio with administrator privelege so the event logs could be searched. And I am writing to my event log locally with no other issues.
My question is, when my customer intalls this new version of my web service, will it be able/unable to search the logs and if unable, how can it be given admin privelege so it is able, or again is that a bad idea?
I want to display my validation error messages in the MessageBox. I have Four TextBoxes and One Button control. When I click the Button Control, the TextBoxes without the text to be shown in the MessageBox. I have almost done this, but the problem is When I click the Button, the MessageBox is opened as a minimized window. So it is difficult for the end user to realize. I want to display the MessageBox to the user when button clicks.
I want to create a download link for my Windows Forms application. I know you can do that using ClickOnce but I don't want a ClickOnce app so a added a setup project to my application that I just got to work the way I want so now I want to make it downloadable from my website. Should a I a web service or a WCF Service to do this or something else and what else should I do?
I'm trying to deploy my MVC 2.0 web application to a Windows 2003 server with IIS6, and can't find the means to do it. I read about clicking Build/Deploy, but I don't have this showing on my menu, and I have the professional version.
I am using Vs2008 in that i created one new project of Windows form using C# language. but the thing is i want to connect the database connection to that one, but there is no webconfig file. how to connect the database connection.
I have a windows service that calls a class library. The call to the Class library from the windows form application works fine. But from the service I do get the desired output. The event viewer does not report any error. The service was working fine until the recently when the server got remastered. Any suggestions what might have gone wrong?
I have a development box running Win7 and VS2010. A User Acceptance Testing server running Windows Server 2008 / Sql Server 2008 and a Live server running Windows Server 2008 / Sql 2008.
When doing development I connect to a development database on the UAT server.
I have a problem that only occurs when I change the connection string to point to the database on the Live Server.
So, before I start describing the problem - the app works fine in development and when published to the UAT server - but there is a problem when I either publish it to the live server or, whilst on my dev box, point the connection string to the live database.
Here's an example.
I have a page with a gridview on it. In each row of the gridview there is a drop down list. All calls to the database are done through a Data Access class.
Say I have a function on an .aspx.cs page called GetDetails().
In this - to populate the Gridview I'll have something like ...
How do I connect to a remote site in IIS 7.5 using vwd 2010? vwd 2010 appears to be looking for deprecated software instead of the IIS 7.5 supported protocol using webdav. My application uses a cookie authentication from a central corporate authority and nothing but a legitimate URL is going to work during debugging. There is almost no information in a google search and the only forums.asp.net post from last year says it isn't possible. If MS is no longer supporting FPSE in the new versions of IIS, then what is vwd 2010 doing looking for it--is there a patch or module of some kind that is available to enable webdav access?
I'm in the process of re-writing an existing survey application that is currently using nested repeater controls to display questions and answers. The application was not designed with future enhancements in mind and its a pain any time a new question has to be added to the application. The repeaters currently contain questions, answers, and controls(texbox, radiobuttonlist,etc.)
Is the repeater the correct control to use for this type of application? What is the best way to design this type of application and table structure? Are there any new controls or features in VS2010? How to design this application the correct way and make it more flexible?