Click here to Skip to main content
15,917,968 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVisula Basic 6.0 Run Time Error : 402 Pin
noshaba mariam10-Apr-06 21:29
noshaba mariam10-Apr-06 21:29 
AnswerRe: Visula Basic 6.0 Run Time Error : 402 Pin
Dave Kreskowiak11-Apr-06 13:37
mveDave Kreskowiak11-Apr-06 13:37 
GeneralRe: Visula Basic 6.0 Run Time Error : 402 Pin
noshaba mariam11-Apr-06 17:52
noshaba mariam11-Apr-06 17:52 
Questionsession problem Pin
Amit Agarrwal10-Apr-06 19:40
Amit Agarrwal10-Apr-06 19:40 
AnswerYour question is not directly related to vb.net Pin
JUNEYT11-Apr-06 11:44
JUNEYT11-Apr-06 11:44 
QuestionIn my VS2003 project I send mail and it sends 7-8 times every time I send it? Pin
kenn_rosie10-Apr-06 19:29
kenn_rosie10-Apr-06 19:29 
QuestionIn my Global asax file aDo I need the code below newmail.fields.add and why do I need them? Pin
kenn_rosie10-Apr-06 19:15
kenn_rosie10-Apr-06 19:15 
Questionit saving two records instead of one Pin
Amit Agarrwal10-Apr-06 19:12
Amit Agarrwal10-Apr-06 19:12 
when i execute following code then it save two record instead of one.....

Imports System.Data
Imports System.Data.Odbc
Partial Class Category
Inherits System.Web.UI.Page
Public x As Integer
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ConnStr As String = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=AgentImg;uid=root;pwd=;option=3"
Dim con As OdbcConnection = New OdbcConnection(ConnStr)

Dim str1 As String
Dim ad As OdbcDataAdapter = New OdbcDataAdapter()

If (Option1.Items(1).Value = 1) Then
str = "insert into Category(id,Category_Name,Category_Price,Category_Img,Category_Desc,Category_header) Values('','" & TextBox1.Text & "', '" & TextBox2.Text & "','" & FileUpload1.FileName & "','" & TextBox4.Text & "','" & TextBox5.Text & "' )"
Else
str = "insert into Category(id,Category_Name,Category_Price,Category_Img,Category_Desc,Category_header) Values('','" & TextBox1.Text & "', '' ,'" & FileUpload1.FileName & "','" & TextBox4.Text & "','" & TextBox5.Text & "' )"
End If

Dim InsCom As OdbcCommand = New OdbcCommand(str1, con)


con.Open()
InsCom.ExecuteNonQuery()

TextBox1.Text = ""
TextBox2.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
con.Close()
End Sub
Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Option1.SelectedIndexChanged
If (Option1.Items(0).Selected = True) Then
x = 1
TextBox2.Enabled = True
End If

If (Option1.Items(1).Selected = True) Then
x = 2
TextBox2.Enabled = False
End If
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
End Class

i have set the autopostback property true of optionlist1.
please give the suggstion.

GeneralRe: it saving two records instead of one Pin
Guffa10-Apr-06 22:30
Guffa10-Apr-06 22:30 
GeneralRe: it saving two records instead of one Pin
Amit Agarrwal10-Apr-06 23:19
Amit Agarrwal10-Apr-06 23:19 
GeneralRe: it saving two records instead of one Pin
Guffa11-Apr-06 1:42
Guffa11-Apr-06 1:42 
GeneralRe: it saving two records instead of one Pin
Amit Agarrwal11-Apr-06 2:15
Amit Agarrwal11-Apr-06 2:15 
AnswerRe: it saving two records instead of one Pin
Guffa11-Apr-06 3:45
Guffa11-Apr-06 3:45 
Questiondatagrid in vb.net Pin
pankajgarg1210-Apr-06 18:53
pankajgarg1210-Apr-06 18:53 
AnswerRe: datagrid in vb.net Pin
Amit Agarrwal10-Apr-06 19:14
Amit Agarrwal10-Apr-06 19:14 
Questioninterview questions Pin
pankajgarg1210-Apr-06 18:49
pankajgarg1210-Apr-06 18:49 
AnswerRe: interview questions Pin
Steve Pullan11-Apr-06 13:55
Steve Pullan11-Apr-06 13:55 
GeneralRe: interview questions Pin
Dave Kreskowiak11-Apr-06 17:26
mveDave Kreskowiak11-Apr-06 17:26 
GeneralRe: interview questions Pin
Steve Pullan11-Apr-06 17:54
Steve Pullan11-Apr-06 17:54 
QuestionHow to display selected field in crystal report Pin
sparkycodeproject10-Apr-06 16:11
sparkycodeproject10-Apr-06 16:11 
Questionvb.net modify mdb database NEED HELP! Pin
ckkc456710-Apr-06 15:49
ckkc456710-Apr-06 15:49 
AnswerRe: vb.net modify mdb database NEED HELP! Pin
Chatura Dilan10-Apr-06 17:27
Chatura Dilan10-Apr-06 17:27 
GeneralRe: vb.net modify mdb database NEED HELP! Pin
ckkc456710-Apr-06 18:59
ckkc456710-Apr-06 18:59 
GeneralRe: vb.net modify mdb database NEED HELP! Pin
Chatura Dilan10-Apr-06 23:11
Chatura Dilan10-Apr-06 23:11 
Question2 frameworks on 1 machine Pin
gtu12285510-Apr-06 14:27
gtu12285510-Apr-06 14:27 

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.