What am i doing wrong?

vbscript

    Next

  • 1. How to trace back and forward button event
    Does any one know how to trace back and forward and refresh button event. I am making web based app. I wanted to restrict user doing (Back-Forward-Refresh) opration on my Web App. Is there any way I can disable or else I can trace the event? Thanks in advance, Ritu
  • 2. Vbscript Submit command - Postback value to asp.net
    I have a datagrid that is on an ASP.net web page which I am trying to pass back an x / y value for a cell in the datagrid. So far I have the ability to determine the x / y value being clicked on using vbscript. I am trying to use a Postback to the vb.net code on the ASP.net web page. I am currently attempting to use Submit.value in vbscript code, but cannot see the value when the Postback occurs. Any help would be greatly appreciated. Alan (Endicott, NY)
  • 3. What happened to IPSecurity in IISv6
    Hello I have a vbscript that sets the IPSecurity property on a website in IISv6 hosted on Windows Server 2003 R2 Now the script doesn't work anymore. Does anyone know if access to the IPSecurity property through a script has been removed by an update? If so, is there another way to access the property. Regards Bo
  • 4. VBA Code For Vlookup
    Hi, I will need your help to give me correct VBA code for Vlookup. I have one workbook which has two worksheet Named "Sheet1" & "Sheet2" In "Sheet1" I have all main data. In "Sheet2" I have another data which I want compare. I want to compare data in column "G" with data in "Sheet2" Please note that in "Sheet2" I have 4 column & i want output from 4th column in "Sheet2" in "Sheet1" in column "W". Sheet1 : Column G Column H Column I CustomerCode CustomerName Amount 130LPL18933 KETER UK LTD 6894.5 130GLA16122 FOXTEQ UK LTD 2175 Sheet2 : Column A Column B Column C Column D Customer Number Customer Name City Businessarea.Responsible 130LPL18933 MCEWAN, QC GIRVAN Scotland Business 130GLA16122 NOMADS TENT EDINBURGH Scotland Business Please note that I have used VBA code but it's giving me error as "#NAME?" .Range("W2:W15000").FormulaR1C1 = "=VLOOKUP(RC7,Sheet2!A:D,4,FALSE)" Your help is really appreciated. Thanks & Best Regards, Kam.
  • 5. Check system is busy
    In VB to check system i put the following command Do While .busy: DoEvents: Loop Do While .ReadyState <> 4: DoEvents: Loop How the same can be done in VB Script? Thank you.

What am i doing wrong?

Postby Qmx1ZW1hbg » Tue, 27 Feb 2007 11:25:03 GMT

I am trying to create a script that will use the forcereplication method in 
the DFsrconnectionInfo class. (See below of the script)

Set wmi = GetObject("winmgmts:\\" & strcomputer & "\Root\MicrosoftDfs")
Set query = wmi.execquery("Select * from DfsrConnectionInfo")

For Each item In query

item.forcereplication()

Next

I get an SWbemObjectEx: Invalid parameter error on the item.forcereplication 
line.

What am i missing or doing wrong

Thanks

Similar Threads:

1.What am I doing wrong??

Here is what I am trying:

My.Computer.FileSystem.CopyFile("\\server\all\sets\!!!!!PREFS
\Application Data", _
"C:\Documents and Settings\" & Environment.UserName & "\Application
Data\Adobe", True)
        MessageBox.Show("Done Resetting Application Data, Press OK to
Continue and reset Local Settings data", "Backup in progress...",
MessageBoxButtons.OKCancel, MessageBoxIcon.Information)
        My.Computer.FileSystem.CopyFile("\\server\all\sets\!!!!!PREFS
\Local Settings", _
"C:\Documents and Settings\" & Environment.UserName & "\Local Settings
\Application Data\Adobe", True)
        MessageBox.Show("Done Resetting Local Settings data, Press OK
to Continue.", "Backup in progress...", MessageBoxButtons.OK,
MessageBoxIcon.Information)

I get the error that: \\server\all\sets\Application Data  is not
found, but it is there, and inside that folder I want to copy a folder
to c:\doc and set\user\application data\adobe

Also, will this work like this, one statement after another to do two
things?

thanks

2.What am I doing wrong - Trying to update

I have enclosed the sample code that I created.  I want to read in employee 
data, and modify a few fields.  I have tried to globally declare the objects 
that I need but I still am having problems.  I want to update in a seperate 
subroutine and seem to have problems.  HELP please.

-------------------------------------------
Public Class Form1

    Inherits System.Windows.Forms.Form
    Public cn As OleDb.OleDbConnection
    Public ds As DataSet
    Public da As OleDb.OleDbDataAdapter
    Public rowEmployee As DataRow

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load

        Try
            Dim strConn As String
            strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data 
Source=C:\adonetsbs\SampleDBs\nwind.mdb;"

            Dim cn As New OleDb.OleDbConnection(strConn)

            Dim strSQL As String
            strSQL = "SELECT EmployeeID, FirstName, LastName, Address, City, 
Region, " & _
                "PostalCode from Employees ORDER BY LastName, FirstName"

            Dim da = New OleDb.OleDbDataAdapter(strSQL, strConn)
            Dim ds As New DataSet

            da.Fill(ds, "Employees")

            Dim tbl As DataTable = ds.Tables(0)

            'rowEmployee = New DataRow
            rowEmployee = tbl.Rows(0)
            txtFirstName.Text = rowEmployee("FirstName")
            txtLastName.Text = rowEmployee("LastName")
            txtAddress.Text = rowEmployee("Address")

        Catch ex As Exception
            MessageBox.Show(ex.Message & " :: " & ex.Source)
        Finally
        End Try
    End Sub

    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles btnUpdate.Click
        Try
            rowEmployee("LastName") = txtLastName.Text
            da.Update(ds)

        Catch ex As Exception

            MessageBox.Show(ex.Message & " :: " & ex.Source)

        End Try

    End Sub
End Class
---------------------------------------

When it runs I get the following error:

"Object reference not set to an instance of an object."

on the             da.Update(ds)       line in the btnUpdate_Click routine.

HELP.

Thanks,

Gary


3.Project build problem - what am I doing wrong?

I have a program that needs to access a prewritten external data file
that is supplied with the program. I want to place this data file in
Environment.SpecialFolder.LocalApplicationData\MyProgramFolder\

In the program's setup project I've done: Add Special Folder | User's
Application Data File, then within this created a folder called
MyProgramFolder, then Add File and pointed to a copy of my external
data file, which duly appears in the folder contents (EXCEPT that it
has a wavy line underneath!)

But unfortunately the resulting setup program does not install the
external data file where it should - in fact as far as I can see it
does not install it at all anywhere on the target PC.

Cany anyone advise what I'm doing wrong please? The fact that the file
entry has a wavy line underneath is presumably indicative of an error
but what's the cause and how do I fix it?

JGD

4.Table doesn't update - What am I doing wrong?

I have a form that has three textboxes on.  I want to be able to modify the 
FirstName, LastName, and Address

Here is the code to load the data
----------------------------------------------------------------------------
   Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load

        Dim strSQL As String = "Select * from Contact where sysid = '" & 
g_sysID & "'"
        DB = New SqlClient.SqlDataAdapter(strSQL, CN)
        ES.Clear()
        DB.Fill(ES, "Contact")

        If ES.Tables("Contact").Rows.Count > 0 Then
            txtAddress.Text = 
ES.Tables("Contact").Rows(0).Item("con1_02_03")
            txtFirst_Name.Text = 
ES.Tables("Contact").Rows(0).Item("First_Name")
            txtLast_Name.Text = 
ES.Tables("Contact").Rows(0).Item("Last_Name")
        End If

    End Sub
--------------------------------------------------------------------------
Here is the code to update the table
--------------------------------------------------------------------------
   Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles btnUpdate.Click

        Try
            es.Tables(0).Rows(0).Item("First_Name") = txtFirst_Name.Text
            es.Tables(0).Rows(0).Item("Last_Name") = txtLast_Name.Text
            es.Tables(0).Rows(0).Item("con1_02_03") = txtAddress.Text
            ES.AcceptChanges()
            DB.Update(ES, "Contact")

        Catch ex As Exception

            MessageBox.Show(ex.Message)

        End Try

    End Sub
-----------------------------------------------------------------
Why doesn't the table update?  Can anyone give me an explanation and also if 
I need to change code, please tell me where to put the modifications?

Thanks,

Gary


5.Newbe question, What am I doing wrong

Hi,
I have two questions the first is: in the example below how can I call
an event from within a statement, such as replace Stop1 with cmdStop1
which is a button on my form?
My second question again deals with the example below. Shouldn't I see
the valve of " i" counting away in the  txtCount1 text box? I don't
see anything in the text box and would like to know what I'm doing
wrong. Thanks in advance for any and all help.
Regards,
Ken



 Stop1 = 0
        Do
            For i As Integer = 1 To 10
                txtCount1.Text = i
                If Stop1 = 1 Then
                    Exit Do
                End If
            Next i
        Loop
    End Sub

6. Programatically getting a RichTextBox to scroll - What Am I doing Wrong

7. What am I doing wrong?



Return to vbscript

 

Who is online

Users browsing this forum: No registered users and 92 guest