Click here to Skip to main content
16,008,750 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to pass value of a variable of one form to the next in vb.net Pin
Christian Graus5-Jul-07 1:11
protectorChristian Graus5-Jul-07 1:11 
AnswerRe: How to pass value of a variable of one form to the next in vb.net Pin
Mycroft Holmes4-Jul-07 23:01
professionalMycroft Holmes4-Jul-07 23:01 
GeneralRe: How to pass value of a variable of one form to the next in vb.net Pin
Johan Hakkesteegt4-Jul-07 23:21
Johan Hakkesteegt4-Jul-07 23:21 
AnswerRe: How to pass value of a variable of one form to the next in vb.net Pin
Christian Graus5-Jul-07 1:12
protectorChristian Graus5-Jul-07 1:12 
Questionthis code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 21:44
magedhv4-Jul-07 21:44 
AnswerRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 21:48
magedhv4-Jul-07 21:48 
GeneralRe: this code was working in form1 and did not work in form2 Pin
SHatchard4-Jul-07 21:56
SHatchard4-Jul-07 21:56 
GeneralRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 22:07
magedhv4-Jul-07 22:07 
SHatchard wrote:
If you were to put a breakpoint on the line

cmd.CommandText = s

And watch the value of s you would be able to see the SQL so you could check the syntax.





thanks for ur reply

i have made breakpoint to see the values every one have the value that entered in textbox and combobox ....
and i have correct the code as u said but the same error

here is the correction that i wrote
        Dim f1, f2, f3, f4, f5, f6, f7, f8 As String<br />
<br />
        f1 = "#" & DateTimePicker1.Value & "#,"<br />
<br />
        f2 = "'" & ComboBox1.Text & "',"<br />
<br />
        f3 = "'" & ComboBox2.Text & "',"<br />
<br />
        f4 = "'" & TextBox1.Text & "',"<br />
<br />
        f5 = "'" & TextBox2.Text & "',"<br />
<br />
        f6 = "'" & TextBox3.Text & "',"<br />
<br />
        f7 = "'" & TextBox4.Text & "',"<br />
<br />
        f8 = "'" & Label10.Text & "'"<br />
<br />
        s = "insert into sale"<br />
        s = s & " (dte,op,nos,cost,coms,nii,npp)values "<br />
<br />
        s = s & "(" & f1 & "," & f2 & "," & f3 & "," & f4 & "," & "," & f5 & "," & "," & f6 & "," & f7 & "')"<br />
<br />
        cmd.CommandText = s<br />
        cmd.ExecuteNonQuery()<br />
        MsgBox("Saved succssefuly")<br />
<br />



if u have another SOLUTION plz tell me
thanks a lot
GeneralRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 22:11
magedhv4-Jul-07 22:11 
GeneralRe: this code was working in form1 and did not work in form2 Pin
SHatchard4-Jul-07 23:03
SHatchard4-Jul-07 23:03 
GeneralRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 23:12
magedhv4-Jul-07 23:12 
GeneralRe: this code was working in form1 and did not work in form2 Pin
SHatchard4-Jul-07 23:13
SHatchard4-Jul-07 23:13 
AnswerRe: this code was working in form1 and did not work in form2 Pin
magedhv4-Jul-07 23:26
magedhv4-Jul-07 23:26 
GeneralRe: this code was working in form1 and did not work in form2 Pin
Christian Graus5-Jul-07 1:19
protectorChristian Graus5-Jul-07 1:19 
Questionhow can i add check box to gridView header.. Pin
koolprasad20034-Jul-07 21:19
professionalkoolprasad20034-Jul-07 21:19 
AnswerRe: how can i add check box to gridView header.. Pin
DanB19835-Jul-07 4:43
DanB19835-Jul-07 4:43 
QuestionEmbeding all Application settings while compiling. Pin
NANCO4-Jul-07 20:59
NANCO4-Jul-07 20:59 
Questionrestrict open multiple times on same application Pin
PrakashBhaskar4-Jul-07 20:58
PrakashBhaskar4-Jul-07 20:58 
AnswerRe: restrict open multiple times on same application Pin
SHatchard4-Jul-07 21:15
SHatchard4-Jul-07 21:15 
AnswerRe: restrict open multiple times on same application Pin
NANCO4-Jul-07 22:05
NANCO4-Jul-07 22:05 
GeneralRe: restrict open multiple times on same application Pin
PrakashBhaskar4-Jul-07 22:57
PrakashBhaskar4-Jul-07 22:57 
AnswerRe: restrict open multiple times on same application Pin
Rupesh Kumar Swami4-Jul-07 22:21
Rupesh Kumar Swami4-Jul-07 22:21 
GeneralRe: restrict open multiple times on same application Pin
PrakashBhaskar4-Jul-07 22:56
PrakashBhaskar4-Jul-07 22:56 
QuestionSaveSettings Pin
nitin34-Jul-07 20:15
nitin34-Jul-07 20:15 
AnswerRe: SaveSettings Pin
ips_sun6-Jul-07 2:22
ips_sun6-Jul-07 2:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.