lolafuertes 145 Master Poster

Having an OledbConnection instanced and opened, you can create an OledbCommand with the command string "EXECUTE MyStoredProcedure" and then using the oledbcommand.executenonquery method.

All of this bein valid if the underlying DB can support stored procedures.

Hope this helps

Is there a way to used stored procs in visual studio when utilizing oledb?

lolafuertes 145 Master Poster

Windows forms allow to direct translate the texts on your form using the form designer and setting the Localizable option to true. Then on the default language set the texts you want to appear when no language was selected.
You can select as many languages you need. For each language you need to translate all the texts in the form. Also, you can change some appareances due to language requirements.

This thechnique uses resource files from Visual Studio, one for each language.

Then, on the form load (or activate) event, you can use a resource manager for the current assembly to load the appropiate texts, depending on the default culture info (see the system globalization), or the one selected by the user.

If you are talking about the multilanguage texts for a database item like a product description, then you can add a unique identifier to each item and create a table with the unique identifier and cultureinfo name as keys, and the translation as the text.

Searching using the default (or the selected by the user) culture info and the unikie identifier, you can find the text to show. Have in mind to always have almost a default text when no translation is provided.

Hope this helps.

Hello peoplez,

I am writing an application in vb.net using a mysql database.
I need it to be multilingual.
I have not found much useful info on this so I thought …

lolafuertes 145 Master Poster

Mostly, you are using a query to show the results. But... you need to use an updatable query.

An updatable query must not use aggregate functions nor outer joins nor return calculated values. All this functionality should be imlemented on the report design

or

Create temporary tables with the right info, then use them for the report.

lolafuertes 145 Master Poster

In your code you are adding items to the list, not just showing the new volume.

To do that, you must set the new value to the Text property of the listbox and to the VLC.Volume using some code like

ListBox1.text = V.tostring
VLC.Volume = V
lolafuertes 145 Master Poster

I would suggest to pass the question number to the question presenter routine, an use the index to access the array:

Sub question(Byval intQuestionNumber as Integer)
        txtQuestion.Text = strQuestionInfo(intQuestionNumber , 0)
        btnAnswer1.Text = strQuestionInfo(intQuestionNumber , 1)
        btnAnswer2.Text = strQuestionInfo(intQuestionNumber , 2)
        btnAnswer3.Text = strQuestionInfo(intQuestionNumber , 3)
        btnAnswer4.Text = strQuestionInfo(intQuestionNumber , 4)
    End Sub

So calling the routine can be:

Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
        btnStart.Hide()
        intQuestionNo += 1
        question(intQuestionNo)
    End Sub

Maybe you also need to know wich button is the right answer for the question

Dim intRightAnswerButton as Integer = {3, 5, 4, 2, 1}  ' I'm not currently aware of the right answers :-)

So to load the current question you can add a Private variable for the class like

Private intRightAnswer as Integer = 0

and change the question() procedure like

Sub question(Byval intQuestionNumber as Integer)
        txtQuestion.Text = strQuestionInfo(intQuestionNumber , 0)
        btnAnswer1.Text = strQuestionInfo(intQuestionNumber , 1)
        btnAnswer2.Text = strQuestionInfo(intQuestionNumber , 2)
        btnAnswer3.Text = strQuestionInfo(intQuestionNumber , 3)
        btnAnswer4.Text = strQuestionInfo(intQuestionNumber , 4)
        intRightAnswer = intRightAnswerButton(intQuestionNumber)
    End Sub

Then add the necessary code to each button like

Private Sub btnAnswer1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAnswer1.Click
        If intRightAnswer = 1 Then
            intQuestionNo += 1
            question(intQuestionNo)
        End If
    End Sub

    Private Sub btnAnswer2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAnswer2.Click
        If intRightAnswer = 2 Then
            intQuestionNo += 1
            question(intQuestionNo)
        End If
    End Sub

and so on.

Hope this helps.

lolafuertes 145 Master Poster

Just sounds like you have a 'virus' on your machine.

Using msconfig, try to verify all the startup processes and disable every thing you don't really need.

If this does not solves the problem, try to mount the disk on another machine, as secondary disk and try to clean it with a valid antivirus. Finally, execute a chkdsk /B against the disk until no errors found, and remount th disk on your PC.

If the problem continues, maybe formatting the PC and doing a clean install solves your problems.

lolafuertes 145 Master Poster

1) To save a few, you can use indexes instead of keys when referencing controls.
2) Passing byvalue needs to copy the data to the stack. As larger the data is, slower response time.
3) Creating a new string each time you want to reference a control to use it as key for search is very time consuming. Maybe you can consider using string constants
4) The Me.Controls is just a generic collection. If you are aware of the controls in the collection (not dinamyc, or always under programmer control), you can create an array of controls, referencing the controls on the collection instead, or just manage the controls them selfs. Accessing an array element is faster than accesing it throug a collection. Accessing the control itself it the fastest.

Hope this helps.

lolafuertes 145 Master Poster

Maybe you can create a custom query for the data you want to filter, and use it as datasource

lolafuertes 145 Master Poster

Just a few things to have in mind:
1) 2007 specific commands / options are not valid on 2003 so they fail when starting the application with 2003. Ex: Ribbon 2007 is not supported by 2003.
2) 2003 menus are recognizad as addin in 2007, not as menus.
3) I used to revamp all the application to 2007 but saving it in 2003 db format, in order to be able to make an mde.
4) Change all the menus to personalized ribbons. Set you main ribbon as the default ribbon. Hide all the unnecessary Access options and ribbons.
5) Verify the breaking changes in DAO.
6) Finally, as MS ACCESS 2007 is required, I just used to create a virtualizaed terminal server for the application.

Good luck

lolafuertes 145 Master Poster

Quote: http://en.wikipedia.org/wiki/NDISwrapper

You can try http://www.ehow.com/how_5019442_install-xp-drivers-vista.html

Anyway, not all drivers are fully compatible even in XP compatible mode and some fail to install.

lolafuertes 145 Master Poster
lolafuertes 145 Master Poster

In order to be verified as a trusted publisher you need to have a valid X509 certificate from a worldwide trusrworthy Certification authority (IE: Verisign).
The go to project properties and on the signing tab, add your certificate and sign the assembly.
Use http://msdn.microsoft.com/en-us/library/ms247123.aspx as an starting point.

lolafuertes 145 Master Poster

Seems related on how SQL handles the severity level.
(http://msdn.microsoft.com/en-us/library/ms178592.aspx)

lolafuertes 145 Master Poster

A quick tutorial:
http://msdn.microsoft.com/en-us/library/bb972257(es-es).aspx

The tutorial is in Spanish and no English version found.
The code examples are clear. You can babelfish a little for the translation.
:)

lolafuertes 145 Master Poster

A possible solution:
a) Clean the Debug folder of your project.
b) Compile/Test your project again in Debug mode.
c) Burn a cd with the content of your Debug folder.

lolafuertes 145 Master Poster

Hereafter you can find an example of the class definition.
Some hints:
* The internal class values, and those of the propertires must match in the type of variable
* You need Functions instead of Subroutines to return values.

'
'   The Rectangle class:
'
'   This class will use the system.drawing to handle the rectangle color.
'   You shoul need td add the system.drawuing .net componenet to your project references
'   If otherwise required, you can use a string to hold the color name.
'
Public Class clsRectangle
    '
    '   The class internal width
    '
    Private dblWidth As Double
    '
    '   The class internal heigth
    '
    Private dblHeight As Double
    '
    '   The class internal color
    '
    Private clrColor As System.Drawing.Color
    '
    '   Default constructor, without parameters
    '
    Public Sub New()
        '
        '   Default height assigned to the class internal heigth
        '
        Me.dblHeight = 1D
        '
        '   Default width assigned to the class internal width
        '
        Me.dblWidth = 1D
        '
        '   Default white color assigned to the class internal color
        '
        Me.clrColor = Drawing.Color.White
        '
    End Sub
    '
    '   Contructor with parameters: 
    '       dblwidth: a double indicating the desired width of the rectangle
    '       dbllength: a double indicating the desired heigth of the rectangle
    '       rectanglecolor: a system.drawing.color to paint the rectangle
    '
    Public Sub New(ByVal dblwidth As Double, _
                    ByVal dbllength As Double, _
                    ByVal rectanglecolor As System.Drawing.Color)
        '
        '   Assign the width to the internal class width
        '
        Me.dblWidth = dblwidth
        '
        ' …
lolafuertes 145 Master Poster

Just analyze what are you doing on this piece of code

1 - excel = New Microsoft.Office.Interop.Excel.Application
2 - wb = excel.Workbooks.Open(filen)
3 - excel.Visible = True
4 - wb.Activate()
5 - ws = New Microsoft.Office.Interop.Excel.Worksheet
6 - ws = wb.Worksheets("Sheet1")
7 - wc = New Microsoft.Office.Interop.Excel.Chart
8 - wc = ws.ChartObjects(1).Activate

On step 1 you create a new wxcel application
On step 2 you open an already existing excel workbook on file
On step 3 you make Excel visible if it wasn't.
On step 4 you activate the opened workbook
On step 5 you create a new worksheet, alone, not in the workbook.
On step 6 you override the new created worksheet with one named "Sheet1" supposed to exist on the workbook. (Is this true?)
On step 7 you create a new char, alone, not in the workbook nor in the sheet.
On step 8 you override the new chart with one (index 1 of the charobjects) supposed already exists on the 'Sheet1' wich in fact is not proven to exist.

So, basically, you are activating an object that, most probably, does not exist on the workbook you open.

If wat you want is to create new sheets and charts, you need to add the sheet to the corresponding collections of workbook sheets, and then the chart to the char objects collection.

Hope this helps
PD: see

lolafuertes 145 Master Poster

Put an eye on http://www.winzip.com/prodpagecl.htm

Lola Fuertes
Almost learn one new thing every day.