|
Again, documentation... DataAdapter.Fill Method (System.Data.Common) | Microsoft Docs[^]
If you're going to fill a DataSet object, your 'myDataSet', you also need to supply a string next, which you did, but you also have to supply an IDataReader, and a couple of integers.
Don't. You don't need it. Just get rid of the "Companies" string.
|
|
|
|
|
The problem is with your connection string - you haven't specified the Database , so your queries aren't running against the correct database.
SQL Server connection strings - ConnectionStrings.com[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Guys,
I'm new member with C#, i'm working project with windows form.
My idea is create new label when I click a button, and the label have just created can change location when click and move mouse. And I want save new label and it's location after close app window form. I havent know how to i do this. So Please support for me!
Thanks!
|
|
|
|
|
What have your tried?
Where are you stuck?
What help do you need?
Just saying "I want to do this" without explaining what part of it is giving you problems doesn't help anyone - we aren't here to just hand you a complete solution, so we need to know how far you have got already.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
![Go to Parent](https://www.codeproject.com/App_Themes/CodeProject/Img/arrow-up24.png) Hi!
Thanks for your reply,
Here is my code. i just only create new label.
<pre>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Form1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
bool selected = false;
private void Form1_Load(object sender, EventArgs e)
{
}
int B = 1;
public System.Windows.Forms.Label AddNewLabel()
{
System.Windows.Forms.Label newLabel = new System.Windows.Forms.Label();
this.Controls.Add(newLabel);
newLabel.Top = B * 28;
newLabel.Left = 50;
newLabel.Text = "DOOR EXIT " + this.B.ToString();
if (B >= 5)
{
newLabel.Top = B * 28;
newLabel.Left = 100;
}
else
{
newLabel.Left = 50;
}
B = B + 1;
newLabel.BorderStyle = BorderStyle.FixedSingle;
newLabel.TextAlign = ContentAlignment.MiddleCenter;
if(newLabel.MouseMove)
{
newLabel.Location = e.Location;
}
return newLabel;
}
private void btn_Create_Click(object sender, EventArgs e)
{
AddNewLabel();
}
}
}
|
|
|
|
|
Yes, but that code won't even compile, much less run.
And if it did run, it wouldn't do what you wanted.
What is e ?
Why are you testing an Event? They aren't bools!
Stop guessing, and look at your course notes: you should have covered dynamic label creation, and if they haven'y then you need to learn what to do properly.
As a suggestion, create a new project with a form. In the designer, add a label, and add handlers for the MouseDown, MouseUp, and Move Events. Then fill in those event handlers so that you can move the label around on your form.
When that works, look at your form.desigtner.cs file (go to your form constructor code and right click the call to InitializeComponent , then select "Go To Definition" and it's take you to the right place in the right file).
Look at what it does to create the label - that's the code you need to start thinking about.
Give it a try - it's not really complicated, it just takes a little thinking about instead of guessing and hoping!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hi, i need developer a tool to <big>solve complex captcha using c#</big>, i created a tool to do this but the solution do not recognized many pics
Please a need a help.
The url to download the solution is here [URL DELETED]
:confused:
|
|
|
|
|
Captcha is there to prevent automated access to sites and apps: any attempts to bypass that is against the terms and conditions of the site or app, and that makes it malicious code.
We do not condone, support, or assist in the production of malicious code in any way, form, or manner. This is a professional site for professional developers.
If you want to know how to create such things, you need to visit a hacking site: but be sure to disable all firewalls and antivirus products first or they won't trust you enough to tell you.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
URL for site known for illegal downloads removed.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hello dear friends
Windows Form C # project.
In a sense, I have four combo boxes and a text box.
I intend to include the text of the combo box when selecting combo box items. Otherwise the item will not be added.
Thanks
|
|
|
|
|
Sorry, but you are going to have to explain that in quite bit more detail: remember that we cannot see your screen, access your HDD, or read your mind - we only get exactly what you type to work from; we get no context other than that.
So stop trying to type as little as possible, and explain it to us in some detail - the better your question, the better our answer can be.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Do you have a question?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Project Description: By Using this Program User can able to do different following
operations using Arrays. 1. Insertion, 2. Deletion, 3. Sorting, 4. Searching, 5. Update, 6.
Retrieve, 7. Merging, 8. Append, 9. Exit. This Menu Driven Program will enhance the array
operations capability in c programming. In this program User can insert, delete, sort, search,
update, retrieve, merge, and append the elements in array with respect to the user choice.
|
|
|
|
|
Good for the Project!
That's very clever of it.
However, while we are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.
So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You are very lazy. So lazy you can't even ask a question.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
So lazy that they couldn't bother rewording their homework assignment.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
This happens all the time. Do they really think that someone will read it and decide to go do it for them? It boggles the mind.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
"I feel like setting the trend of doing a future co-worker's job for them right now. No time like the present!"
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
I want to pass values between two Forms (c#). How can I do it?
I have two forms: Form1 and Form2.
Form1 contains one button. When I click on that button, Form2 should open and Form1 should be in inactive mode (i.e not selectable).
Form2 contains one text box and one submit button. When I type any message in Form2's text box and click the submit button, the Form2 should close and Form1 should highlight with the submitted value.
How can i do it? Can somebody help me to do this with a simple example
|
|
|
|
|
|
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You should rest some more, tomorrow is Monday...
|
|
|
|
|
|
|
I wrote script in Python which activates webcam and take picture for the code,
I want to change the webcam to digital camera but, the code didnt recognize the device as a camera so I can't use it.
I want to know how a digital camera can connect to a python code like a webcam." :laugh
|
|
|
|