Click here to Skip to main content
15,898,134 members
Home / Discussions / Visual Basic
   

Visual Basic

 
SuggestionRe: Error displayed when trying to load Dictionary.com in my application Pin
Richard Deeming22-Oct-13 9:27
mveRichard Deeming22-Oct-13 9:27 
GeneralRe: Error displayed when trying to load Dictionary.com in my application Pin
thatraja24-Oct-13 3:32
professionalthatraja24-Oct-13 3:32 
AnswerRe: Error displayed when trying to load Dictionary.com in my application Pin
TnTinMn22-Oct-13 13:40
TnTinMn22-Oct-13 13:40 
QuestionCalling Functions in DLLs Pin
SeaWasp122-Oct-13 3:41
SeaWasp122-Oct-13 3:41 
AnswerRe: Calling Functions in DLLs Pin
Simon_Whale22-Oct-13 3:49
Simon_Whale22-Oct-13 3:49 
GeneralRe: Calling Functions in DLLs Pin
SeaWasp122-Oct-13 8:26
SeaWasp122-Oct-13 8:26 
GeneralRe: Calling Functions in DLLs Pin
Simon_Whale22-Oct-13 9:36
Simon_Whale22-Oct-13 9:36 
QuestionError Converting data type vachar to numeric Pin
Member 1019283522-Oct-13 0:32
Member 1019283522-Oct-13 0:32 
Dear Freind,

So many times i posted my questions in this forum , but never i got a satiesfied answer, don't know why?

again following i m posting the query which is raised at the time of executing the program.


Private Sub txtplno_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtplno.LostFocus
Dim str As String
Dim com As SqlCommand
Dim conn As New SqlConnection("Data Source=toshiba-pc;Initial Catalog=VRINDAVAN;User ID=sa;password=zion123")
conn.Open()
str = ("select count(*)from plotmaster where plotno='" + txtplno.Text & "'")

com = New SqlCommand(str, conn)

Dim count As Integer = Convert.ToInt32(com.ExecuteScalar())'**----the error comes here**
conn.Close()
If count > 0 Then
MessageBox.Show("Plot No. already Exist")
txtplno.Text = ""
txtplno.Focus()

Else
txtpsize.Focus()
dgvstatus2.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2
conn.Close()

End If
End Sub

this code is working properly that it's checks the existing record and if exist it throw message that data already exist,and not the cursor goes to next text field after filling the all text boxes just i click on add button it's shows that successfully saved, but when i click on gridview it's display the message at where i indicating above followed by asterisk,and the error is in subject line.

please do needful

below is my table structure

CREATE TABLE [dbo].[plotmaster](
[pkid] [int] IDENTITY(1,1) NOT NULL,
[plotno] [numeric](5, 0) NULL,
[plotsize] [varchar](10) NULL,
[block] [varchar](5) NULL,
[sqyards] [numeric](10, 0) NULL,
[rate] [numeric](18, 0) NULL,
[plot_total_rate] [numeric](18, 0) NULL,
[Book_amt] [numeric](18, 0) NULL,
[date] [smalldatetime] NULL,
[referance] [varchar](50) NULL,
[status] [varchar](15) NULL,
CONSTRAINT [PK_plotmaster_1] PRIMARY KEY CLUSTERED
AnswerRe: Error Converting data type vachar to numeric Pin
Richard Deeming22-Oct-13 1:49
mveRichard Deeming22-Oct-13 1:49 
GeneralRe: Error Converting data type vachar to numeric Pin
Member 1019283522-Oct-13 21:39
Member 1019283522-Oct-13 21:39 
SuggestionRe: Error Converting data type vachar to numeric Pin
Richard MacCutchan22-Oct-13 1:54
mveRichard MacCutchan22-Oct-13 1:54 
GeneralRe: Error Converting data type vachar to numeric Pin
Member 1019283522-Oct-13 21:37
Member 1019283522-Oct-13 21:37 
Questionis it possible to have a duplicate uuid generated in vb.net? Pin
hansoctantan22-Oct-13 0:01
professionalhansoctantan22-Oct-13 0:01 
AnswerRe: is it possible to have a duplicate uuid generated in vb.net? Pin
Eddy Vluggen22-Oct-13 0:16
professionalEddy Vluggen22-Oct-13 0:16 
AnswerRe: is it possible to have a duplicate uuid generated in vb.net? Pin
Marco Bertschi22-Oct-13 1:29
protectorMarco Bertschi22-Oct-13 1:29 
GeneralRe: is it possible to have a duplicate uuid generated in vb.net? Pin
Richard Deeming22-Oct-13 1:57
mveRichard Deeming22-Oct-13 1:57 
GeneralRe: is it possible to have a duplicate uuid generated in vb.net? Pin
Marco Bertschi22-Oct-13 2:02
protectorMarco Bertschi22-Oct-13 2:02 
GeneralTrouble with Shell and Sendkeys Pin
Member 1034848620-Oct-13 19:45
Member 1034848620-Oct-13 19:45 
GeneralRe: Trouble with Shell and Sendkeys Pin
Dave Kreskowiak21-Oct-13 1:38
mveDave Kreskowiak21-Oct-13 1:38 
GeneralRe: Trouble with Shell and Sendkeys Pin
Member 1034848623-Oct-13 1:03
Member 1034848623-Oct-13 1:03 
GeneralRe: Trouble with Shell and Sendkeys Pin
Dave Kreskowiak23-Oct-13 2:23
mveDave Kreskowiak23-Oct-13 2:23 
GeneralRe: Trouble with Shell and Sendkeys Pin
Eddy Vluggen23-Oct-13 7:29
professionalEddy Vluggen23-Oct-13 7:29 
GeneralRe: Trouble with Shell and Sendkeys Pin
Dave Kreskowiak23-Oct-13 9:01
mveDave Kreskowiak23-Oct-13 9:01 
GeneralRe: Trouble with Shell and Sendkeys Pin
Member 1034848623-Oct-13 20:49
Member 1034848623-Oct-13 20:49 
GeneralRe: Trouble with Shell and Sendkeys Pin
Dave Kreskowiak24-Oct-13 3:15
mveDave Kreskowiak24-Oct-13 3:15 

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.