|
I found this link:
http://www.dreamincode.net/forums/topic/152297-c%23-log-in-to-website-programmatically/
and it kinda shows how to log into a twitter account. Im trying to do
the same thing to a yahoo account or godaddy account or anything else
just to understand this more.
Can anyone show me how to log into something like yahoo or godaddy or
something else other than twitter? Please any response any one can
give me will be greatly appreciated.
|
|
|
|
|
i use this code
SqlCommand cmd1 = new SqlCommand("insert into '" + comboBox6.SelectedItem.ToString() + "' (name,address,telephone,website,email,info,place_id,cor_x,cor_y)values(" + "'" + textBox_name.Text + "','" + textBox_address.Text + "','" + textBox_telephone.Text + "','" + textBox_website.Text + "','" + textBox_email.Text + "','" + richTextBox_info.Text + "' , select id from places where name= '"+ comboBox6.SelectedItem.ToString() +"','" + textBox_corx.Text + "','" + textBox_cory.Text + "') ", con);
and this error showed
Incorrect syntax near the keyword 'select'.
Incorrect syntax near ','.
what should i do ?
|
|
|
|
|
I don't know, but that would be easier to read if you used String.Format and a parameterized query (which you should do anyway).
|
|
|
|
|
I don't think you want single quotes around your table name on the 'insert' command.
Jack of all trades ~ Master of none.
modified 6-Apr-12 20:25pm.
|
|
|
|
|
I would use two SQL statements, one to get the place ID from its name, then the big insert which needs the result of the former statement.
And I would:
- never publish code in a proportional font (they invented PRE tags to get readable code here);
- not build such complex statements; why not building a string first, so you can see it, log it, whatever;
- not take user input without validating it;
- use SqlParameters.
And finally you could consider creating a stored procedure to do this.
|
|
|
|
|
Presently working with C# programming book and using Visual Studio 2008 Tem Suite. One exercise requires that I insert the text:
MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About");
Although I have done this once successfully, I have not been able to repeat because the text within the parentheses is now shown in RED. The message box appears containing the notification "ClassSystem.String Represents text as a series of Unicode characters"
I am a novice and have tried to search this but have not found information to correct this issue. Guidance sought
|
|
|
|
|
mauricemcse wrote: MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About");
There is nothing wrong with this code.
mauricemcse wrote: I have not been able to repeat because the text within the parentheses is now
shown in RED.
It's red by default. It's called "syntax coloring" so you can easily see that the item is a string. If you do not like the red color, you can change it from your Tools->Options menu item.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
The text being shown in red is just Visual Studio's way of telling you that it is a literal string. MessageBox is a light blue because it's a class. Show is black because it's a function, and so on.
The "Class System.String..." message that appears when you hold the mouse pointer over it is Visual Studio telling you about Strings. If you hold the mouse over MessageBox or over Show you will see other helpful messages about them.
What issue is it that you are trying to correct?
BDF
I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be.
-- BillWoodruff
|
|
|
|
|
The first attempt at the code insertion did not demonstrate a red font and so when the exercise was repeated I assumed the red font was an indication of a problem. I have visited other forums where such queries are met with hostility or ridicule. I am truly appreciative of the responses I get here.
Cordially,
mauriceMCSE
|
|
|
|
|
Depends on the question here -- and timing.
|
|
|
|
|
It's strange that the first attempt wasn't colored red. Best not to waste time trying to figure out why not, I suppose. I wish you success in your future coding exercises.
BDF
I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be.
-- BillWoodruff
|
|
|
|
|
As mentioned, these are the default colors for the text editor. You can always change and customize these colors as described here[^].
|
|
|
|
|
Hi,
In my class library project, I have class1 and class2.
I difined both of them as public and tried to access class2 functions in class1 by creating objects. When I expose this library project dll to other test project, I would like to restrict access to class2. Pls guide me. Thanks in advance
|
|
|
|
|
You'll probably want internal. Check here[^]
V.
|
|
|
|
|
I used internal keyword for class2 and it met my requirements. Thanks
|
|
|
|
|
If you use the reply feature at the bottom of a specific message it goes to the person who wrote it.
In this case, I replied to your message about internal, and the system sent you an email.
Your message replied to your original message, so no email was sent.
If you had replied to V's message he would have got one.
It's not important this time - but in future it's worth remembering as it can speed up responses. If you get a email, you can respond quickly. If you don't then it's next time you visit the page before you notice a reply.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Before checking V's message, "internal" solution came to my mind and it was working. So, for others(people facing the same issue) sake, I posted reply to my message. By that time, I didn't check latest replies.
|
|
|
|
|
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Don't worry I've seen your post .
But idd, if you want me to get the mail from your message, reply to my message instead of your own.
good that you solved the problem.
V.
|
|
|
|
|
|
I would like to create a wait form that displays a progress bar (marquee) be called in my program, for example:
myWaitForm.StartWait ();
......
do some work .....
.....
myWaiForm.StopWait ();
How can I do?
thanks
|
|
|
|
|
|
What you describe is normally called a Splashscreen.
If you search the articles on this site using that term you will find many examples such as A Pretty Good Splash Screen in C#[^]. I am not suggesting that is the best one, it is just the first from the list when I searched.
The other suggestion of using a backgroundworker could also be useful, in which case you might make your search term backgroundworker splashscreen.
Henry Minute
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
Cogito ergo thumb - Sucking my thumb helps me to think.
|
|
|
|
|
|
MemberDotNetting wrote: I also found on this blog template studio 2010 but how add it.
This[^] blog might help you to work that out. If not, then I found that by using vs2010 how to add a template as a search phrase in my favourite search engine. It gives over half a million hits, give it a try.
Henry Minute
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
Cogito ergo thumb - Sucking my thumb helps me to think.
|
|
|
|