Click here to Skip to main content
15,892,768 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Load xlsx filr from folder and write to new workbook Pin
Richard MacCutchan4-Feb-19 22:00
mveRichard MacCutchan4-Feb-19 22:00 
GeneralRe: Load xlsx filr from folder and write to new workbook Pin
manju 34-Feb-19 23:49
manju 34-Feb-19 23:49 
QuestionMacro Substitution en VB.Net Pin
Member 141390043-Feb-19 17:00
Member 141390043-Feb-19 17:00 
AnswerRe: Macro Substitution en VB.Net Pin
Eddy Vluggen3-Feb-19 22:45
professionalEddy Vluggen3-Feb-19 22:45 
GeneralRe: Macro Substitution en VB.Net Pin
Member 141390049-Feb-19 13:24
Member 141390049-Feb-19 13:24 
GeneralRe: Macro Substitution en VB.Net Pin
Member 141390043-Mar-19 6:18
Member 141390043-Mar-19 6:18 
GeneralRe: Macro Substitution en VB.Net Pin
Eddy Vluggen3-Mar-19 6:28
professionalEddy Vluggen3-Mar-19 6:28 
AnswerRe: Macro Substitution en VB.Net Pin
Maciej Los5-Feb-19 2:38
mveMaciej Los5-Feb-19 2:38 
I agree with Eddy Vluggen that there's no FoxPro macro substitution in vb.net, but depending on data provider you can use:
1) sql variables
2) CommandType to define:
    - StoredProcedure - the name of a stored procedure,
    - TableDirect - the name of a table,
    - Text - any SQL command (text - Default).
and
3) Command.Parameters

For example:
VB
Dim sConn As String = "properconnectionstring"
Dim oRdr As OleDbDataReader
Dim dt As DataTable = New DataTable()
Dim empIdToFind As Integer = 111

Using oConn As OleDbConnection = New OleDbConnection(sConn)
    oConn.Open()
    Using oComm AS OleDbCommand = New OleDbCommand()
        oComm.Connection = oConn
        oComm.CommandType = CommandType.Text
        oComm.CommandText =  "SELECT * FROM MyUsers WHERE EmpId=@empid;"
        oComm.Parameters.AddWithValue("@empid", empIdToFind)
        oComm.ExecuteNonQuery()
        oRdr = oComm.ExecuteReader()
        dt.Load(oRdr)
    End Using
    oConn.Close()
End Using

GeneralRe: Macro Substitution en VB.Net Pin
Member 141390049-Feb-19 13:25
Member 141390049-Feb-19 13:25 
GeneralRe: Macro Substitution en VB.Net Pin
Member 141390043-Mar-19 6:17
Member 141390043-Mar-19 6:17 
QuestionCompute Sum on a column based on criteria Pin
Member 1412885424-Jan-19 6:54
Member 1412885424-Jan-19 6:54 
AnswerRe: Compute Sum on a column based on criteria Pin
Richard Deeming24-Jan-19 8:41
mveRichard Deeming24-Jan-19 8:41 
GeneralRe: Compute Sum on a column based on criteria Pin
Member 1412885424-Jan-19 17:47
Member 1412885424-Jan-19 17:47 
QuestionRe: Compute Sum on a column based on criteria Pin
Ralf Meier24-Jan-19 19:58
mveRalf Meier24-Jan-19 19:58 
AnswerRe: Compute Sum on a column based on criteria Pin
Member 1412885424-Jan-19 21:07
Member 1412885424-Jan-19 21:07 
AnswerRe: Compute Sum on a column based on criteria Pin
Ralf Meier24-Jan-19 21:22
mveRalf Meier24-Jan-19 21:22 
QuestionUnable to load xlsm file with Office 2016 Pin
manju 323-Jan-19 20:18
manju 323-Jan-19 20:18 
QuestionRe: Unable to load xlsm file with Office 2016 Pin
Richard MacCutchan23-Jan-19 22:40
mveRichard MacCutchan23-Jan-19 22:40 
AnswerRe: Unable to load xlsm file with Office 2016 Pin
Mycroft Holmes24-Jan-19 11:20
professionalMycroft Holmes24-Jan-19 11:20 
GeneralRe: Unable to load xlsm file with Office 2016 Pin
Richard MacCutchan24-Jan-19 22:08
mveRichard MacCutchan24-Jan-19 22:08 
QuestionRe: Unable to load xlsm file with Office 2016 Pin
Maciej Los24-Jan-19 2:49
mveMaciej Los24-Jan-19 2:49 
QuestionA Class Model with sort capabilities, Linq Sort, Array Sort instead of OrderBy Pin
jkirkerx17-Jan-19 8:45
professionaljkirkerx17-Jan-19 8:45 
AnswerRe: A Class Model with sort capabilities, Linq Sort, Array Sort instead of OrderBy Pin
Mycroft Holmes17-Jan-19 12:39
professionalMycroft Holmes17-Jan-19 12:39 
GeneralRe: A Class Model with sort capabilities, Linq Sort, Array Sort instead of OrderBy Pin
jkirkerx17-Jan-19 13:19
professionaljkirkerx17-Jan-19 13:19 
QuestionCode not taking pictures from webcam when form in system tray Pin
Frankie_M15-Jan-19 23:46
Frankie_M15-Jan-19 23:46 

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.