|
You can't store it directly. Since you are referring to a RDMale and a RDFemale I'd recommend you to store it as an enum.
This enum may look like that:
enum Gender{
Male,
Female
};
Afterwards you are able to store the value into a database like a normal enum, you only have to parse it to a numeric value before you store it.
|
|
|
|
|
You would store the result of the radio button as either an int or a bit (assuming that you are using SQL Server).
i.e.
dim Male as boolean = RDMale.checked
if you test that line in your application you will see that it will return true if you have checked that button or false if you haven't
Also I would have a look at using SQLParameters as this will save you from SQL Injection have a look at this StackOverflow question the actual question will show you how to set it up in VB.NET
http://stackoverflow.com/questions/16765837/set-sqlparameter-in-vb-net[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Let me Explain about the entire structure of what we are doing before start ask the question
Our client required Custom Primary keys for all our transactions. To create the key, we are using store procedure which require an input parameter named "SiteCode". This store procedure will create sequence keys for every transaction in the application we have made
Every transaction insert we have written a Stored procedure and inside this sp's we have call the key generating SP before we do insert statements and we have given those key as a primary key to the insert statement. So the actual "SiteCode" input parameter has passed to every transaction SP's as an input parameter
We have created DB first entity Model and all the entity class has been created
Now We have a screen in WPF which capture the data for the models Customer, Address, Contact information.
so Instead of getting model one by one and do save changes. we would like to map the stored procedure function (used to insert the values) with respective model
for example CutomerRef attribute to sp_CreateCustomer SP in entity framework
While we are doing this mapping we can mapp all the fields except the "SiteCode" field which don't have reference in any entity model.
We have tried to create partial class to the cutomerRef model and add this property in to that partial class and try to map with SP it doesn't work Also, tried to create the field in the model itself in entity model and map with the sp parameters also not working.
We know, we can do this to call sps from stored procedure but we need them to do just by Context.Customer.Add(customerModel)
Any help would be appriciated
Regards,
Ansari
|
|
|
|
|
Hi,
I know that this question also relates to Excel but I wanted to know if there's a way or if somebody can direct me how can I access a PowerPivot table in Excel and manipulate it i.e. update data, save data, retrieve data etc'.
Basically my purpose is to interact with the PowerPivot table so I can display the data and update it from a web browser.
Avi
|
|
|
|
|
Try and give this[^] a go.
|
|
|
|
|
Thanks! It looks good.
I'll check it out.
|
|
|
|
|
i wanna new features about 2008,2010 and 2012 its urgent please ...........mail me vsateesh.mca@gmail.com or call me 9014470340
Thanks And Regards
v sateesh
9014470340
|
|
|
|
|
|
And you like spam, don't you?
Now everyone knows your email address, and even your phone number. What a good invitation to spammers!
|
|
|
|
|
There will be tons of information available on msdn and on the internet.
No one but spammers will respond to you if you give your email id out on a public forum.
|
|
|
|
|
|
SateeshVankayala wrote: urgent please
Urgent for you, not to anyone else.
And you seriously think people will draft an email or call you to provide you with the information you need? If this is your attitude towards learning, I'm sure you wouldn't learn anything in your life.
|
|
|
|
|
In keypress event the character which i press should come after my input which i send using send keys.
here is the code
if asc(e.keychar)=102 then 'ascii value of "f"
system.windows.forms.sendkeys.send("A")
end if
"f" should come after "A",but it is displaying as "fA"
How to solve this guys....
|
|
|
|
|
|
You can set the SuppressKeyPress property of the KeyEventArgs supplied in your event handler to true and then pass on both A and F in the SendKeys.
|
|
|
|
|
Hi,
I have created a custom addIn for outlook 2007 using VS2010.
I have created a custom Ribbon using xml containing a single toggleButton control. This is for new message screen. After clicking the "New Mail Message" from outlook custom ribbon visible along with the toggle button. Once I pressed the toggle button and sent the mail the toggle button remains same (on press) for every new message later. Can anybody please help me how to make toggleButton getPressed status to unchecked for every new mail message click event.
Thanks.
|
|
|
|
|
Why are you even using a toggle button? Why not a normal button??
|
|
|
|
|
byte b1 = 4;
byte b2 = 2;
byte result = b1 - b2 //error here Cannot explicitly convert type 'int' to 'byte'. Are you missing a cast?
Question is : where does the compiler see the 'int' here, where all variables are byte?
|
|
|
|
|
It is a feature of C#. The byte variables are widened to integers before performing the subtraction. Hence, the result is an integer. You can prove this to yourself with this:
object o = b1 - b2;
MessageBox.Show("o is a: " + o.GetType().FullName); So to get rid of that nasty error:
byte result =(byte)(b1 - b2); See: Why do operations on "byte" result in "int"?[^] for an explanation of why this was done.
|
|
|
|
|
|
Guys i am designing a editor,and in this editor i am using keypress event to block the pressed key and adding my input key to the text box.While adding the characters the scroll bar is automatically moving to the top of the page
i have used "textbox1.scrollcaret" also but it is always making the cursor line to be a last line.
Example
after few lines have been entered
if i add
if asc(e.keychar)=102 'For "f" ascii value of f is 102
e.handled =true
textbox1.text=textbox1.text + "c"
end if
How to solve this problem guys....
|
|
|
|
|
You are making it to complex.
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = "f"c Then
e.KeyChar = "c"c
End If
End Sub
This will work fine for the user using the keyboard, but have you thought about how you are going to handle the user pasting text? That will not get translated using this method.
|
|
|
|
|
Thanks a lot "TnTinMn" this has solved my problem exactly.
|
|
|
|
|
When I press any character in any editor the corresponding character should not be displayed on the screen and instead of the blocked character i would like to display my own characters in that editor.
i have to do this with my minimized form i.e when my form is in background and when it is closed the inputs should be displayed on the screen as i type.
How to do this process?
|
|
|
|
|
You can't. Minimized forms do not receive input. Further, it'll never work for "all applications"; I doubt that Warcraft lets you modify the contents of the password-textbox.
Did you try the virtual keyboard I linked to in your previous post?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|