Click here to Skip to main content
15,886,873 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: sql query syntax in .net Pin
thatraja12-Feb-14 4:31
professionalthatraja12-Feb-14 4:31 
AnswerRe: sql query syntax in .net Pin
Richard Deeming12-Feb-14 5:22
mveRichard Deeming12-Feb-14 5:22 
AnswerRe: sql query syntax in .net Pin
Eddy Vluggen12-Feb-14 6:56
professionalEddy Vluggen12-Feb-14 6:56 
GeneralRe: sql query syntax in .net Pin
Member 1050621512-Feb-14 22:01
Member 1050621512-Feb-14 22:01 
AnswerRe: sql query syntax in .net Pin
Eddy Vluggen12-Feb-14 22:28
professionalEddy Vluggen12-Feb-14 22:28 
GeneralRe: sql query syntax in .net Pin
Member 1050621512-Feb-14 22:35
Member 1050621512-Feb-14 22:35 
GeneralRe: sql query syntax in .net Pin
Eddy Vluggen13-Feb-14 0:31
professionalEddy Vluggen13-Feb-14 0:31 
GeneralRe: sql query syntax in .net Pin
Member 1050621513-Feb-14 1:39
Member 1050621513-Feb-14 1:39 
Done Smile | :)
i need to add multiple cars for just one member. Here is my code for saving cars:

VB
Dim cmd As New SqlCommand
        cmd.Connection = mcon
        cmd.CommandText = "insert into membercars(serial, memberid, make, model, plate, color, tag) values (@serial, @memberid, @make, @model, @plate, @color, @tag);"
        cmd.Parameters.AddWithValue("@serial", txtserial.Text)
        cmd.Parameters.AddWithValue("@memberid", txtserial.Text)
        cmd.Parameters.AddWithValue("@make", txtmake.Text)
        cmd.Parameters.AddWithValue("@model", txtmodel.Text)
        cmd.Parameters.AddWithValue("@plate", txtplate.Text)
        cmd.Parameters.AddWithValue("@color", txtcolor.Text)
        cmd.Parameters.AddWithValue("@tag", txttag.Text)
        cmd.ExecuteNonQuery()}
        fillgrid() 

And this for saving mambers:

VB
cmd.Connection = mcon
                strsql = "insert into members "
                strsql = strsql & "(name, "
                strsql = strsql & "familyname, "
                strsql = strsql & "address, "
                strsql = strsql & "mobile, "
                strsql = strsql & "phone, "
                strsql = strsql & "fax, "
                strsql = strsql & "email, "
                strsql = strsql & "space, "
                strsql = strsql & "timezone, "
                strsql = strsql & "website) "
                strsql = strsql & "values ('" & txtname.Text & "', "
                strsql = strsql & "'" & txtfamilyname.Text & "', "
                strsql = strsql & "'" & txtaddress.Text & "', "
                strsql = strsql & "'" & txtmobile.Text & "', "
                strsql = strsql & "'" & txtphone.Text & "', "
                strsql = strsql & "'" & txtfax.Text & "', "
                strsql = strsql & "'" & txtemail.Text & "', "
                strsql = strsql & "'" & txtspace.Text & "', "
                strsql = strsql & Val(cmbtimezone.SelectedValue) & ", "
                strsql = strsql & "'" & txtwebsite.Text & "') "
                strsql += " SELECT IDENT_CURRENT('members')"
                ' 'strsql += " SELECT @@IDENTITY;"
                ' '' 
                cmd.CommandText = strsql
                ''cmd.ExecuteNonQuery()
                txtsearch.Text = ""
                txtserial.Text = cmd.ExecuteScalar().ToString()


Thank you for your replies Smile | :)
GeneralRe: sql query syntax in .net Pin
Eddy Vluggen13-Feb-14 2:59
professionalEddy Vluggen13-Feb-14 2:59 
GeneralRe: sql query syntax in .net Pin
Member 1050621513-Feb-14 3:48
Member 1050621513-Feb-14 3:48 
GeneralRe: sql query syntax in .net Pin
Eddy Vluggen13-Feb-14 4:59
professionalEddy Vluggen13-Feb-14 4:59 
QuestionUploading Data from MySql to MS Project using .net C# Pin
Badari Narayan11-Feb-14 21:22
Badari Narayan11-Feb-14 21:22 
AnswerRe: Uploading Data from MySql to MS Project using .net C# Pin
Richard MacCutchan11-Feb-14 21:25
mveRichard MacCutchan11-Feb-14 21:25 
Questionserialport timeout c# .net 4 client profile Pin
openLG11-Feb-14 1:40
openLG11-Feb-14 1:40 
QuestionRe: serialport timeout c# .net 4 client profile Pin
Eddy Vluggen11-Feb-14 3:11
professionalEddy Vluggen11-Feb-14 3:11 
SuggestionRe: serialport timeout c# .net 4 client profile Pin
Richard MacCutchan11-Feb-14 4:43
mveRichard MacCutchan11-Feb-14 4:43 
AnswerRe: serialport timeout c# .net 4 client profile Pin
Gerry Schmitz12-Feb-14 9:03
mveGerry Schmitz12-Feb-14 9:03 
QuestionHow to call a Phython Script from .Net Pin
Kandepu Rajesh10-Feb-14 12:11
Kandepu Rajesh10-Feb-14 12:11 
SuggestionRe: How to call a Phython Script from .Net Pin
Richard MacCutchan10-Feb-14 21:00
mveRichard MacCutchan10-Feb-14 21:00 
AnswerRe: How to call a Phython Script from .Net Pin
Bernhard Hiller10-Feb-14 21:15
Bernhard Hiller10-Feb-14 21:15 
GeneralRe: How to call a Phython Script from .Net Pin
Kandepu Rajesh10-Feb-14 21:18
Kandepu Rajesh10-Feb-14 21:18 
GeneralRe: How to call a Phython Script from .Net Pin
Pete O'Hanlon10-Feb-14 23:52
mvePete O'Hanlon10-Feb-14 23:52 
AnswerRe: How to call a Phython Script from .Net Pin
Kornfeld Eliyahu Peter10-Feb-14 23:29
professionalKornfeld Eliyahu Peter10-Feb-14 23:29 
QuestionCustom Control Visual Basic .Net Pin
JM768-Feb-14 2:01
JM768-Feb-14 2:01 
AnswerRe: Custom Control Visual Basic .Net Pin
Dave Kreskowiak8-Feb-14 2:54
mveDave Kreskowiak8-Feb-14 2:54 

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.