Click here to Skip to main content
16,004,927 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralSimple Syntax Issue Pin
Capilano17-Aug-05 5:11
Capilano17-Aug-05 5:11 
GeneralRe: Simple Syntax Issue Pin
Dave Kreskowiak17-Aug-05 5:31
mveDave Kreskowiak17-Aug-05 5:31 
GeneralRe: Simple Syntax Issue Pin
Capilano17-Aug-05 6:46
Capilano17-Aug-05 6:46 
GeneralRe: Simple Syntax Issue Pin
Anonymous17-Aug-05 7:05
Anonymous17-Aug-05 7:05 
GeneralRe: Simple Syntax Issue Pin
Capilano17-Aug-05 7:10
Capilano17-Aug-05 7:10 
GeneralRe: Simple Syntax Issue Pin
Dave Kreskowiak18-Aug-05 4:35
mveDave Kreskowiak18-Aug-05 4:35 
GeneralRe: Simple Syntax Issue Pin
Anonymous18-Aug-05 5:09
Anonymous18-Aug-05 5:09 
GeneralInserting data using web form with less code Pin
User 191970217-Aug-05 4:27
User 191970217-Aug-05 4:27 
Here's my delima. I have a web form that inserts data into a SQL database via a stored procedure. I have 64 columns per row. The data can only be inserted/viewed but not deleted or updated. Is there a better way of updating 64 fields without having to assign the value of Textbox.Text directly? Here's what I'm doing it currently:
submitEPARControl.ascx.vb (Fieldnames changed for security):
Private Sub lbSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbSubmit.Click
Dim newRow As DataRow
Dim strUIC As String
Dim ds As New DataSet
Dim di As New DataInterface

If Page.IsValid Then
ds = di.CreateEmptyDataSet
ds.Tables(0).TableName = "Table"

newRow("Field1") = Field1.Text
newRow("Field2") = Field2.Text
newRow("Field3") = Field3.Text

ds.Tables(0).Rows.Add(newRow)
di.AddData(ds)
Else
End If
End Sub
DataServices.vb:

Public Function AddData(ByRef dsAddition As DataSet)
Dim db As Database = DatabaseFactory.CreateDatabase()
Dim dbCommandWrapper As DBCommandWrapper = db.GetStoredProcCommandWrapper("MyStoredProc")

dbCommandWrapper.AddInParameter("@Field1", DbType.String, "Field1", DataRowVersion.Proposed)
dbCommandWrapper.AddInParameter("@Field2", DbType.String, "Field2", DataRowVersion.Proposed)
dbCommandWrapper.AddInParameter("@Field3", DbType.String, "Field3", DataRowVersion.Proposed)

Return db.UpdateDataSet(dsAddition, dsAddition.Tables(0).TableName, dbCommandWrapper, Nothing, Nothing, UpdateBehavior.Continue)
End Function

- Paul Davis
GeneralRe: Inserting data using web form with less code Pin
Dave Kreskowiak17-Aug-05 5:29
mveDave Kreskowiak17-Aug-05 5:29 
GeneralRe: Inserting data using web form with less code Pin
User 191970217-Aug-05 5:56
User 191970217-Aug-05 5:56 
Generalcombobox in datagrid Pin
atul_moghe17-Aug-05 2:33
atul_moghe17-Aug-05 2:33 
GeneralRe: combobox in datagrid Pin
thebread17-Aug-05 6:10
thebread17-Aug-05 6:10 
GeneralRe: combobox in datagrid Pin
atul_moghe17-Aug-05 18:15
atul_moghe17-Aug-05 18:15 
Generalcapturing and handling keyboard input Pin
oakleaf17-Aug-05 2:17
oakleaf17-Aug-05 2:17 
GeneralRe: capturing and handling keyboard input Pin
oakleaf17-Aug-05 2:36
oakleaf17-Aug-05 2:36 
GeneralRe: capturing and handling keyboard input Pin
Dave Kreskowiak17-Aug-05 4:07
mveDave Kreskowiak17-Aug-05 4:07 
GeneralRe: capturing and handling keyboard input Pin
oakleaf17-Aug-05 5:08
oakleaf17-Aug-05 5:08 
GeneralRe: capturing and handling keyboard input Pin
Dave Kreskowiak17-Aug-05 5:21
mveDave Kreskowiak17-Aug-05 5:21 
GeneralRe: capturing and handling keyboard input Pin
oakleaf17-Aug-05 5:25
oakleaf17-Aug-05 5:25 
GeneralReleaseComObject() and Dispose pattern association Pin
DeepakSharma17-Aug-05 2:12
DeepakSharma17-Aug-05 2:12 
GeneralRe: ReleaseComObject() and Dispose pattern association Pin
Dave Kreskowiak17-Aug-05 3:54
mveDave Kreskowiak17-Aug-05 3:54 
GeneralRe: ReleaseComObject() and Dispose pattern association Pin
DeepakSharma17-Aug-05 17:40
DeepakSharma17-Aug-05 17:40 
QuestionHow to create dbf file in vb.net Pin
TooLeeDiN17-Aug-05 0:58
TooLeeDiN17-Aug-05 0:58 
AnswerRe: How to create dbf file in vb.net Pin
toxcct17-Aug-05 1:24
toxcct17-Aug-05 1:24 
AnswerRe: How to create dbf file in vb.net Pin
Dave Kreskowiak17-Aug-05 3:45
mveDave Kreskowiak17-Aug-05 3:45 

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.