I am only new in vb 2008 .I Want to populate a combo box in vb 2008 with mysql, but when i run the thing that appear is "System.__ComObject"..kindly check the errors...plz..

Dim conn As ADODB.Connection
        Dim rs As ADODB.Recordset
        conn = New ADODB.Connection
        rs = New ADODB.Recordset

        With conn
            .ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
            & "SERVER=" & MySQL_SVR & ";" _
            & "DATABASE=documentdb;" _
            & "UID=" & MySQL_UID & ";" _
            & "PWD=" & MySQL_PWD & ";" _
            & "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
            .CursorLocation = ADODB.CursorLocationEnum.adUseClient
        End With


        query = ("select typeofletter from lettertypes")
        rs.Open(query, conn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockBatchOptimistic)

        Do While Not rs.EOF

Edited by __avd: Added [code] tags.

6 Years
Discussion Span
Last Post by jlego

i didnt run your code
but i know when i use adodb i have to use .value after fields

Do Until Data.ADORS.EOF

Edited by jlego: n/a


how about in hashing a string about my login form which is the username and the password....
kindly help me...please...


please anydy help me...converting numbers into barcode..and print it...i dont know of what will be the sequence..i got this code in the web...please help me....

Dim TestBarCode As New TALBarCode           ' create a TALBarCode data type
        Dim MyMetaPict As New MetaFilePict

        hDC = Form.CreateGraphics.GetHdc.ToInt32

        Msg = txtBarcodeID.Text
        'MyCtext = "Comment"

        TestBarCode.MessageBuffer = Msg
        TestBarCode.MessageLength = Len(Msg)
        'TestBarCode.CommentBuffer = MyCtext
        'TestBarCode.CommentLength = Len(MyCtext)
        TestBarCode.NarrowBarWidth = CInt(2.54 * 13)

        TestBarCode.NarrowToWideRatio = 25

        TestBarCode.FGColor = &H0&

        TestBarCode.BGColor = &H80000005&
        TestBarCode.Orientation = 0
        TestBarCode.MyFontName = "Arial" + Chr
        TestBarCode.MyFontSize = 10
        TestBarCode.TextColor = 0

        TestBarCode.OutputOption = OutputTohDC%         ' set output option to direct print
        ' OutputTohDC% = 3 = direct to device context
        TestBarCode.OutputhDC = hDC.ToString               ' set device context to the printer

        'set the x & y positions (in inches) on the page where you want the bar code to print
        TestBarCode.XPosInInches = 1                    ' print at 1 inch across
        TestBarCode.YPosInInches = 1                    ' and 1 inch down

        ' Trap errors - a "Missing DLL File" error will occur if you
        ' attempt to call a DLL that is not installed.

        On Error GoTo MissingFileErr

        ' Make the DLL call to print the bar code!
        ' The following code prints the metafile to the default printer

        ' First we print an blank space to let VB know that we are printing something.
        ' Without this line the "Printer.EndDoc" function used below to
        ' eject the page will not work. VB apparently keeps track of
        ' all printing done with VB print methods and if none are invoked
        ' the EndDoc method does nothing. Since we are calling the DLL to print
        ' the bar code, VB has no knowledge that we printed anything.

        PrintDialog1.PrintToFile = " "
        Dim ErrorVal As String
        'Printer.Print " ";  ' print a blank space to initialize the VB printing functions
        TALCODE39(hDC, TestBarCode, MyMetaPict) 'TestBarCode
        'TALCODE39(TestBarCode, MyMetaPict)  ' call the DLL
        '      Printer.EndDoc()      ' eject the page
        On Error GoTo 0

        Exit Sub            ' all done


        Resume Next

    End Sub

Edited by __avd: Added [code] tags.


whenever i create a barcode i always use active reports. im sure crystal reports could do it was well but im not fond of crystal reports. other than that i dont know how to make a barcode. sorry


thanks...please can you give a sample with the use of active reports?


active reports has a barcode object that i simple set the value to whatever i want embeded in the barcode...

sorry not much code behind it


can you plz show me or send some code about barcoding.here at <<Snipped>>

Edited by __avd: Email Snipped.


i think someone gave you some software alternatives in a different thread that you started?

www.datadynamics.com is active reports, this is what i use instead of crystal reports. comes with barcode object

.. not much else i can do

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.