|
This is just an unformatted code dump. If you really expect an answer you should cut this down to the relevant section of code that you have a problem with and properly format your text.
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
|
|
|
|
|
private void Add_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.InsertCommand.CommandText =
"INSERT INTO Db (p-name, address, ID, dnasequence)" +
"VALUES ('"+ this.textBox3.Text +"','"+this.textBox4.Text+
"' , "+ this.textBox1.Text +",'"+ this.textBox2.Text+ "')";
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.InsertCommand.Connection = oleDbConnection1;
this.oleDbDataAdapter1.InsertCommand.ExecuteNonQuery();
this.oleDbConnection1.Close();
MessageBox.Show("Record insedted Successfully");
private void up_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.UpdateCommand.CommandText =
"UPDATE Db SET "+
"p-name ='"+ this.textBox3.Text +"', address ='"+this.textBox4.Text +
"', ID ="+this.textBox1.Text+", dnasequence ='"+ this.textBox2.Text+"'" +
" WHERE ID ="+ this.textBox1.Text;
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.UpdateCommand.Connection = oleDbConnection1;
this.oleDbDataAdapter1.UpdateCommand.ExecuteNonQuery();
this.oleDbConnection1.Close();
MessageBox.Show("Record updated Successfully");
|
|
|
|
|
They should have told the PhD about sql-injection. And proper OO-code. And proper field-names.
..so, you're looking for somebody to rewrite the "update" and "insert" portions?
Bastard Programmer from Hell
|
|
|
|
|
the orginal code is work without any error thr error arise when i chang the database name and column name and also i chang the names in the code
|
|
|
|
|
What error? Could you explain what needs be changed (insert, update) and why - I don't understand the question yet.
If you change the field-names, then make sure that you update them everywhere. Don't use spaces in names, and don't use keywords.
Bastard Programmer from Hell
|
|
|
|
|
mohammed_1983 wrote: the orginal code is work without any error
Wait a minute.... so you had some code from somewhere that you change a bunch of stuff in and then you expect someone else to go through it and fix what you broke?
Does the database you changed to actually exist? Did you change the connection string? Does the table that you are querying really exist? Do the column names in the table match the names in your code? Is the connection opening?
The best thing you can do right off the bat is change all of that string concatenation to parameterized queries.
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
|
|
|
|
|
Try and debug your source code. Put a breakpoint on the line of the query - once running code hits the breakpoint, copy the query from there into Access and run it. You will get to know where the error is.
|
|
|
|
|
Given a text string and an SVG font I need to create an SVG file where each character is represented by a path.
I know that SVG font is just a collection of glyphs so rendering should be relatively easy. However some operations like calculating position of each character, rendering in different font sizes, etc. may be tricky.
Has anyone come across a solution that implements this?
|
|
|
|
|
i've just created a bouncing animation with maximum 100 ball bouncing inside a rectangle.
and i'd love to create a ball bouncing inside a disorder box shape.
i've search over google and keeps finding bouncing ball with gravity.
i mean the one that bounce diagonally.
anyone know what should i type in google?
i really don't know what people call this animation.
|
|
|
|
|
Is it not possible to modify the source code you already have to modify the animation?
I'm sure with some playing around of the code, you would be able to do something.
|
|
|
|
|
Hej
How can I add navigation bar for min tigrina lexikon.
i mean I wanted a single bar for menu navigation in asp.net
|
|
|
|
|
You could try the ASP.NET forum.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
please I really need a code for the african board game AYO for my project.
|
|
|
|
|
Which bit of the code are you missing? I take it you have coded the rest of the game, and there's just a bit missing. Heaven forbid that you're asking for somebody else to do all the work for you.
|
|
|
|
|
Am new to programming but I was given as my project but I dont even know where to start from. I have code one but it is console application.
|
|
|
|
|
I have to move 10 million dollars out of the US. Can you give me your bank account details, and I'll share some with you!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I pleez to help for you?
|
|
|
|
|
cplusplus018 wrote: I dont even know where to start from
<joke>
static void Main()
{
}
</joke>
Start by gaining an understanding of the game.
Replicate the objects in the game, players etc as classes.
Create the logic that governs the game play and interacts with the objects - test this stage thoroughly!
Draw the GUI to retrieve information from the user(s) and the game status if apropriate.
|
|
|
|
|
hi,
I am using an aspxgridview and two checkboxes(for header and dataitem).When I check header checkbox I want to check all checkbox.I am also using java script code.essentially, I can do this, but I must check header checkbox twice times.I didnt understand why it is happening.ı am writing this code checkbox_checked event and header checkbox's autopostpak is true. When I used normal gridview I didnt have any problem I could do this without problem.,
<script language="javascript" type="text/javascript">
function SelectAll(id) {
var IsChecked = id.checked;
var Chk = id;
// Parent = document.getElementById('GrdPerliste');
Parent = document.getElementById('<% = GrdPerliste.ClientID%>');
var items = Parent.getElementsByTagName('input');
for (i = 0; i < items.length; i++) {
var deneme = items[i].type;
if (items[i].id != Chk && items[i].type == "checkbox") {
if (items[i].checked != IsChecked)
{ items[i].click(); }
}
}
}
</script>
protected void Checksec_CheckedChanged2(object sender, EventArgs e)
{
CheckBox chk = (CheckBox)sender;
GridViewHeaderTemplateContainer bulundugucontainer = (GridViewHeaderTemplateContainer)chk.NamingContainer;
((CheckBox)bulundugucontainer.FindControl("Checksec")).Attributes.Add("onclick", "javascript:SelectAll('" + ((CheckBox)bulundugucontainer.FindControl("Checksec")).ClientID + "')");
}
|
|
|
|
|
try this javascript function
function SelectAll(cntrl,grd,indCat)
{
var grdComp = document.getElementById(grd);
if(indCat == '1')
{
for(i=1;i<=grdComp.getElementsByTagName('input').length-1;i++)
{
grdComp.getElementsByTagName('input')[i].checked = cntrl.checked;
}
}
else if(indCat == '2')
{
var chkInd = true;
for(i=1;i<=grdComp.getElementsByTagName('input').length-1;i++)
{
if(grdComp.getElementsByTagName('input')[i].checked == false)
{
chkInd = false;
}
}
grdComp.getElementsByTagName('input')[0].checked = chkInd;
}
}
hope this helps
with regards
Karthik Harve
|
|
|
|
|
thanks for your answer but my problem is that I have to check header checkbox twice.this works only when I check twice so when it works,header check seems not check
|
|
|
|
|
Hi,
I really need help with this...
I need to write c# app (from windows)that will connect to Linux virtual machine server(SLES 10)
with the following information for example:
VM server : example01.xx.example.com
Userid: rrrr
Pssword: rrrr
How can i do it?
all the example that i saw i for connection with TCP.IP address and with port.
Can someone provide me a simple example of C# code for connection to such a Linux server from windows app?
|
|
|
|
|
ronensv wrote: all the example that i saw i for connection with TCP.IP address and with port.
Can someone provide me a simple example of C# code
And the reason that you are unable to use TCP is?
Maybe you can explain what it is that you are trying to connect to? What is it on the Linux side that is waiting for you to connect to it?
And please do not cross post.
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
modified 20-Apr-12 7:26am.
|
|
|
|
|
|
I am sure that the OP would need the links more than I
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
|
|
|
|