The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004
i am trying to add data into my MSSQL table with the following C# code, however when i query the SQL table i receive numeric value in my columns, see my code.When i debug the code i receive no errors , code is successfull
public partial class Workstations : Form
private int n;
private void Workstations_Load(object sender, EventArgs e)
SqlConnection con = new SqlConnection(@"Data Source=SH-JASONK\DEV;Initial Catalog=StockInventory;Integrated Security=True");
private void button1_Click(object sender, EventArgs e)
SqlCommand cmd = new SqlCommand("INSERT INTO Workstations (Emp_Name, Emp_Surname, Department, Company, Hostname, Wkst_Status, Make, Model, SerialNumber, ProductNumber, PurchaseDate, ExpiryDate, Memory, Processor, HDD, OS, MSOffice) VALUES (@Emp_Name, @Emp_Surname, @Department, @Company, @Hostname, @Wkst_Status, @Make, @Model, @SerialNumber, @ProductNumber, @PurchaseDate, @ExpiryDate, @Memory, @Processor, @HDD, @OS, @MSOffice)");
SqlDataAdapter sda = new SqlDataAdapter(cmd);
cmd.Connection = con;
DataTable dt = new DataTable();
I am new to c# and would like someone to assist where i am going wrong and why i am not seeing my input data
You need to do two things:
1) Learn to read about forums before you post in them - there is a very clear message at the top of the page explaining that this forum isn't for questions and pointing out where to post them. Posting here is just rude and arrogant - which doesn't generally endear you to people you want help from ...
2) Learn to read documentation - or at least think about what method names might mean. What kind of data do you think a method called AddWithValue might want? The type of value you you want to put in the DB, or the actual value you want to put in?
I'll give you a clue: it's not the type.
Sent from my Amstrad PC 1640 Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
of course psychics can predict winning numbers... 1, 2, 3, 4, 5 ... didn't say that's next weeks numbers, but keep buying, it'll happen. As any half capable physicist (the real science type) would tell you, "you can reasonably predict the future but can't measure it until it happens" - and by definition 'measurement' includes 'when'.
as to faith healers: I had one not just heal my faith, she completely eliminated it! I mean that's better then my doc, last time I had the flu he only made the symptoms go away, still had the flu.
Why is everyone so cynical and sceptical these days?
Were you not aware that psychics aren't allowed to use their powers for personal gain (other than charging someone 20 quid for a few platitudes, of course).
As for faith-healing, it's simply a case of these things working better in a building where some pastor is reaping in the cash rather than one where doctors and nurses are desperately trying to keep people alive.
Alternative therapies definitely work! The last time I had a cold, a course of reiki and acupuncture sorted it out within a week.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
So, you are saying there are 0 faith healers working in hospitals? I guess that's true, I've never heard of a hospital employing faith healers but I don't think this is worded the way you meant it to be.
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.
Those nasty aliens are up to it again, at least on my gaming notebook which is capable to run XCOM: ENEMY UNKNOWN. Old foes like floaters, mutons and not to forget the dreaded cyberdisk are all present.
It can be snatched at a discount of 75% on The Humble Store.[^] for a couple of days.
It's a hefty download of about 10 Gb, but entirely worth it !
Last Visit: 6-Jul-20 11:31 Last Update: 6-Jul-20 11:31