Click here to Skip to main content
15,923,051 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: calling C++ from Visual Basic code Pin
Dave Kreskowiak27-Feb-08 8:04
mveDave Kreskowiak27-Feb-08 8:04 
GeneralRe: calling C++ from Visual Basic code Pin
Eytukan28-Feb-08 5:37
Eytukan28-Feb-08 5:37 
GeneralRe: calling C++ from Visual Basic code Pin
AndrewVos28-Feb-08 14:24
AndrewVos28-Feb-08 14:24 
QuestionDataset problem Pin
IvanIT27-Feb-08 7:38
IvanIT27-Feb-08 7:38 
GeneralRe: Dataset problem Pin
Dave Kreskowiak27-Feb-08 8:03
mveDave Kreskowiak27-Feb-08 8:03 
GeneralRe: Dataset problem Pin
IvanIT27-Feb-08 8:15
IvanIT27-Feb-08 8:15 
GeneralRe: Dataset problem Pin
Dave Kreskowiak27-Feb-08 9:11
mveDave Kreskowiak27-Feb-08 9:11 
GeneralRe: Dataset problem Pin
Vimalsoft(Pty) Ltd27-Feb-08 19:48
professionalVimalsoft(Pty) Ltd27-Feb-08 19:48 
hi man Vuyiswa here,

Do you want to Do Something like this ?

<br />
  Public Sub TimeAlloc(ByVal strEmployeeNumber As String)<br />
<br />
        Dim strSelectNum As String = "SELECT * FROM tblEmployeeAllocation WHERE EmployeeNumber = ?"<br />
<br />
        Dim strcon As String = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\devELOPMENT\WINTur\TurN.mdb"<br />
<br />
        Dim sda As OleDbDataAdapter<br />
<br />
        Dim dsEmployeeTime As New DataSet<br />
<br />
        Dim cmdDatabase As OleDb.OleDbCommand<br />
<br />
        Dim conDatabase As New OleDbConnection(strcon)<br />
<br />
        cmdDatabase.Parameters.Add("EmployeeNumber", strEmployeeNumber)<br />
<br />
        cmdDatabase.Connection = conDatabase<br />
<br />
        sda.SelectCommand = cmdDatabase<br />
<br />
        Dim bNewTimeAllocation As Boolean<br />
<br />
<br />
        'need to determine if this is a new allcation WHERE EmployeeNumber exists in tblTimeAllocation<br />
        'txtEmployeeNumber.Text'<br />
<br />
        Try<br />
<br />
            conDatabase.Open()<br />
<br />
<br />
            sda.Fill(dsEmployeeTime, "tblEmployeeAllocation")<br />
<br />
            If dsEmployeeTime.Tables("tblEmployeeAllocation").Rows.Count = 0 Then<br />
<br />
                bNewTimeAllocation = True<br />
            Else<br />
<br />
                bNewTimeAllocation = False<br />
<br />
            End If<br />
<br />
            conDatabase.Close()<br />
<br />
        Catch exc As OleDb.OleDbException<br />
<br />
            MsgBox(exc.Message)<br />
        End Try<br />
    End Sub<br />


IvanIT Wrote|The function I am using is outlined below


This is not a Function is a Sub, a Function will return a Value,now i see you have Boolean Variables i suppose you want to return them? if so remove the Sub keyword and use Function and tell your function to return Boolean. lastly my question in the Following line

<br />
Dim recEmployee As DataRow = dsEmployeeTime.Tables(0).Rows(0)<br />
<br />
If recEmployee.IsNull("EmployeeNumber") Then<br />
<br />


What did you want to achieve here?

Thanks

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


Generalsearching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
mishiago27-Feb-08 7:02
mishiago27-Feb-08 7:02 
GeneralRe: searching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
Dave Kreskowiak27-Feb-08 7:31
mveDave Kreskowiak27-Feb-08 7:31 
GeneralRe: searching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
mishiago27-Feb-08 7:49
mishiago27-Feb-08 7:49 
GeneralRe: searching for: VBS for uninstalling symantec antivirus and liveupdate as well Pin
Mycroft Holmes27-Feb-08 18:02
professionalMycroft Holmes27-Feb-08 18:02 
QuestionProblem converting c# to vb.net [modified] Pin
Jan Sommer27-Feb-08 7:01
Jan Sommer27-Feb-08 7:01 
GeneralRe: Problem converting c# to vb.net Pin
Christian Graus27-Feb-08 9:00
protectorChristian Graus27-Feb-08 9:00 
GeneralRe: Problem converting c# to vb.net Pin
Jan Sommer28-Feb-08 4:51
Jan Sommer28-Feb-08 4:51 
QuestionHow to identifying the VB powerpacks controls in panel Pin
VB 8.027-Feb-08 3:15
VB 8.027-Feb-08 3:15 
AnswerRe: How to identifying the VB powerpacks controls in panel Pin
Dave Kreskowiak27-Feb-08 6:27
mveDave Kreskowiak27-Feb-08 6:27 
GeneralAny one can help me Pin
suresh v.p27-Feb-08 2:42
suresh v.p27-Feb-08 2:42 
GeneralRe: Any one can help me Pin
Dave Kreskowiak27-Feb-08 6:30
mveDave Kreskowiak27-Feb-08 6:30 
GeneralThreading event control question Pin
cstrader23227-Feb-08 2:36
cstrader23227-Feb-08 2:36 
GeneralRe: Threading event control question Pin
Dave Kreskowiak27-Feb-08 6:17
mveDave Kreskowiak27-Feb-08 6:17 
GeneralRe: Threading event control question Pin
cstrader23228-Feb-08 2:09
cstrader23228-Feb-08 2:09 
GeneralRe: Threading event control question Pin
Dave Kreskowiak28-Feb-08 3:07
mveDave Kreskowiak28-Feb-08 3:07 
Generaladding progress bar Pin
johnjsm27-Feb-08 2:09
johnjsm27-Feb-08 2:09 
GeneralRe: adding progress bar Pin
Dave Kreskowiak27-Feb-08 6:08
mveDave Kreskowiak27-Feb-08 6:08 

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.