Click here to Skip to main content
15,886,556 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: datagridview button column Pin
Rupesh Kumar Swami3-Mar-09 21:11
Rupesh Kumar Swami3-Mar-09 21:11 
QuestionVB.Net MDI Child form loading issue... Pin
Tej Aj3-Mar-09 6:55
Tej Aj3-Mar-09 6:55 
AnswerRe: VB.Net MDI Child form loading issue... Pin
dan!sh 3-Mar-09 7:04
professional dan!sh 3-Mar-09 7:04 
AnswerRe: VB.Net MDI Child form loading issue... Pin
Navneet Hegde3-Mar-09 10:57
Navneet Hegde3-Mar-09 10:57 
GeneralRe: VB.Net MDI Child form loading issue... Pin
Tej Aj3-Mar-09 20:04
Tej Aj3-Mar-09 20:04 
QuestionHow to create records that have an AutoNumber field Pin
ivo753-Mar-09 6:21
ivo753-Mar-09 6:21 
AnswerRe: How to create records that have an AutoNumber field Pin
ivo753-Mar-09 7:05
ivo753-Mar-09 7:05 
AnswerRe: How to create records that have an AutoNumber field Pin
Tej Aj3-Mar-09 7:32
Tej Aj3-Mar-09 7:32 
I have used Autonumber field in SQL Server DB. In it I did not use to create parameter for the autonumber field.
The syntax is like this for SQL Server DB
Lets say I have 3 fields from which 1st one is autonumber field
strQuery = "insert into Student(FirstName,LastName) values(@fname,@lname)"

param1 = New SqlParameter("@fname_name", SqlDbType.VarChar, 100)
param1.Value = txtName1.Text
param2 = New SqlParameter("@lname_name", SqlDbType.VarChar, 100)
param2.Value = txtName2.Text
Conn.Open()
Cmd = New SqlCommand(strQuery, Conn)
Cmd.Parameters.Add(param1)
Cmd.Parameters.Add(param2)
Cmd.ExecuteNonQuery()
Conn.Close()


NOTE:
> I have mentioned the Database ColumnNames in which I want to insert the
parameter values.

You too try passing Column Names in the insert query I think so doing so will
solve your problem.
Tell me whether this solution worked or not.
GeneralRe: How to create records that have an AutoNumber field Pin
ivo753-Mar-09 7:36
ivo753-Mar-09 7:36 
QuestionInterop problem using Crystal Reports 8 with VB 2005 Pin
Jon_Boy3-Mar-09 5:34
Jon_Boy3-Mar-09 5:34 
QuestionConvert VB6 Project to VB.NET Pin
Pasan1483-Mar-09 4:28
Pasan1483-Mar-09 4:28 
AnswerRe: Convert VB6 Project to VB.NET Pin
ABitSmart3-Mar-09 5:44
ABitSmart3-Mar-09 5:44 
AnswerRe: Convert VB6 Project to VB.NET Pin
Steven J Jowett3-Mar-09 5:45
Steven J Jowett3-Mar-09 5:45 
AnswerRe: Convert VB6 Project to VB.NET Pin
dan!sh 3-Mar-09 7:09
professional dan!sh 3-Mar-09 7:09 
QuestionReporting & Printouts Pin
LostMonkey3-Mar-09 3:06
LostMonkey3-Mar-09 3:06 
AnswerRe: Reporting & Printouts Pin
Mycroft Holmes3-Mar-09 17:04
professionalMycroft Holmes3-Mar-09 17:04 
GeneralRe: Reporting & Printouts Pin
LostMonkey3-Mar-09 22:47
LostMonkey3-Mar-09 22:47 
GeneralRe: Reporting & Printouts Pin
Mycroft Holmes3-Mar-09 23:36
professionalMycroft Holmes3-Mar-09 23:36 
GeneralRe: Reporting & Printouts Pin
Mycroft Holmes3-Mar-09 23:39
professionalMycroft Holmes3-Mar-09 23:39 
GeneralRe: Reporting & Printouts Pin
LostMonkey4-Mar-09 0:04
LostMonkey4-Mar-09 0:04 
QuestionMixing C# and VB in a console application Pin
ksportz3-Mar-09 1:30
ksportz3-Mar-09 1:30 
AnswerRe: Mixing C# and VB in a console application Pin
Eddy Vluggen3-Mar-09 3:18
professionalEddy Vluggen3-Mar-09 3:18 
GeneralRe: Mixing C# and VB in a console application Pin
ksportz3-Mar-09 4:47
ksportz3-Mar-09 4:47 
GeneralRe: Mixing C# and VB in a console application Pin
Eddy Vluggen3-Mar-09 5:05
professionalEddy Vluggen3-Mar-09 5:05 
AnswerRe: Mixing C# and VB in a console application Pin
dan!sh 3-Mar-09 7:12
professional dan!sh 3-Mar-09 7:12 

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.