|
bhawna_k wrote: i m having problem in line
i=mycomm.executenonquery
can ny1 tell why this error occur
Can you tell us what the error is? Knowing what exception was thrown and the message helps a lot in determining what the error is so that a solution can be found.
|
|
|
|
|
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll"
this error occur
|
|
|
|
|
I'll repeat my request with the important bit highlighted: Knowing what exception was thrown and the message helps a lot in determining what the error is so that a solution can be found.
|
|
|
|
|
Can someone help me on my problem.
I'm new in vb and i want to create a report using the designer but i get this error invalid datasource. Where could i have gotten wrong?
Below is my code.
Private Sub cmdprnt_Click()
Set pdbsched = OpenDatabase(App.Path & "\schedule.mdb")
sql1 = "SELECT fldschedEmpID, fldscheddate, fldschedAirline, fldschedDoD, fldschedDoA "
sql1 = sql1 & "FROM tbltripbooking "
Set rs = pdbBook.OpenRecordset(sql1)
rs.MoveFirst
SchedRep.Show
rs.Close
End Sub
|
|
|
|
|
Private Sub cmdprnt_Click()
Set pdbsched = OpenDatabase(App.Path & "\schedule.mdb")
sql1 = "SELECT fldschedEmpID, fldscheddate, fldschedAirline, fldschedDoD, fldschedDoA "
sql1 = sql1 & "FROM tbltripbooking "
Set rs = pdbBook.OpenRecordset(sql1)
set Schedrep.datasource=rs
SchedRep.Show
rs.Close
End Sub
|
|
|
|
|
How can we change paper orientation dynamically by using default printer setup in Visual Basic ? I tried with 'Printer' object but it is not working.
|
|
|
|
|
|
What do you mean with a "hyperlink text"? Is that a label that is made to look like a hyperlink, or should you have asked this question in the Web Development forum instead?
---
single minded; short sighted; long gone;
|
|
|
|
|
What do you mean popup window? are you referring to the messagebox?
|
|
|
|
|
how do i declare a class i have created in a windows application
|
|
|
|
|
to declare an object variable write something like this:
dim yourobject as yourclass
to initialize/create the object write something like this:
yourobject = new yourclass
|
|
|
|
|
how do i start a timer from the toolbox and how do i declare it.
|
|
|
|
|
your question is very confusing...what do u mean by
start a timer from the toolbox ????
whatever.....you can create a Timer in runtime........like this
1.declare a Timer variable like this......<br />
Private WithEvents myTimer As Timers.Timer<br />
<br />
2.write a function SetUpTimer() like......<br />
<br />
Public Sub SetUpTimer()<br />
Try<br />
myTimer = New Timers.Timer<br />
With myTimer<br />
.AutoReset = True<br />
.Interval = 1000<br />
.Start()<br />
End With<br />
Catch obEx As Exception<br />
Throw obEx<br />
End Try<br />
End Sub<br />
3.Wherever you want your timer to start working call SetUpTimer()
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
Hi ,
I want to consolidate two or more rows in a excel sheet from VB.
Plz help.
Ahmad
|
|
|
|
|
is that you are trying to read data from two excel sheets and do some process on the data read.
can u please explain what you are looking for.
Regards
KP
|
|
|
|
|
Hello,
[VS 2005]
Using typed dataset
I have a table adapter that is filled. I want to delete all the previous data that is in the database before filling this table.
Is there a single command that can be used to delete every single row in the database table, then issue the fill command.
With the delete command you have to enter the fields. However, I don't have the name of the fields values until after the table is filled.
Just want to fill the table with fresh data.
Many thanks,
Steve
|
|
|
|
|
try this.
[DatasetName].Tables(0).Rows.Clear()
the zero value pertaining that you only have one table in the dataset.
hope this hepls.
|
|
|
|
|
I would suggest that you can go ahead and write a SP itself that deletes or truncates the table entries.
You can call this SP from TableAdaptor followed by this use the SP to fill the table
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
|
|
|
|
|
sorry for my previouis reply... you can do it this way
dim connection as string = "YourConnectionString"
dim instance as sqlcommand = connection.createcommand
try
instance.commandtext = "Delete * from [TableName]"
instance.commantype = commandtext 'pls this line for sintax
instance.connection.open()
instance.executenonquery()
catch
messegebox.sho(ex.message)
finally
instance.connection.close()
instance.dispose()
end try
'hopes this helps.
|
|
|
|
|
Hi,
I created a database that store the chinese character in mysql. When I retrive these data by :
SELECT * FROM table_name
and display the data in the listview in vb.net, the data become ???. Anyone can help me on this?
Thanks.
|
|
|
|
|
Well, characters in .NET are saved as Unicode Big Endian, which contains almost no Chinese characters, so the problem should be to encode the characters as UTF8.
|
|
|
|
|
My company has been asked to have software follow the users. Software is typically deployed using a software deployment system, Tivoli. This only deploys software to the workstations via Tivoli endpoints (Clients) installed on the workstations. Being this is a Microsoft environment, we have also been asked to incorporate the use of AD to assign users to groups.
The process works as follows:
1. User is assigned to an application group in AD
2. User receives a shortcut on their desktop using group policy
3. User clicks on the shortcut which points to a VB script on a file server.
4. Script opens a VB message box that asks the user if they would like to install the software, YES/NO
5. User clicks NO script ends and the VB Message box closes
6. User clicks YES and the script sends a message to the Tivoli endpoint (client) on the workstation requesting the software package from Tivoli
7. The VB message box closes, and the user just has to wait for the software to be installed by Tivoli.
This works great but...... the user has no idea that the software is installing, or when the software installation is complete.
What I need help with is 2 things:
1. Getting a message box stating "Your software is being installed" to stay on the screen till the software is installed the software is being installed
2. Getting a message box stating "Your software has been installed, please click OK" when the software installation has completed.
Some thoughts:
1. When the MSI is installing the software package, it will ALWAYS leave a log file in the C:\windows\temp directory called xxxx.log where xxxx is the name of the software.
2. The log will always have a line at the end that looks like this: [101007] ****** xxxxxx has successfully been installed.
3. I think that if I could add a section in my VB script that looked for the xxxx.log log file, and then after finding it kept reading it until it found the last line ****** xxxxxx has successfully been installed.
4. While it is looking for the last line, the message box stating "Your software is being installed" to stay on the screen till the software is installed
5. Once the last line is found, the message box stating "Your software has been installed, please click OK" would appear.
'-------------------------------------------------------------------------
'Created date: August 2006
'--------------------------------------------------------------------------
'
'
Const ForReading = 1
Const ForWriting = 2
'Prompt User that software needs to be installed
sMBVB_Msg = ""
sMBVB_Msg = sMBVB_Msg & "This software is being used for the first time, and must be installed. " & vbCr
sMBVB_Msg = sMBVB_Msg & " Click Yes to install the software, or NO to exit."
sMBVB_Title = ""
sMBVB_Title = sMBVB_Title & "WinZip v9.0"
lMBVB_Type = vbYesNo
lMBVB_Type = lMBVB_Type + vbQuestion
lMBVB_Type = lMBVB_Type + vbDefaultButton3
lMBVB_Type = lMBVB_Type + vbMsgBoxSetForeground
iMBVB_ReturnCode = MsgBox(sMBVB_Msg, lMBVB_Type, sMBVB_Title)
'If answer is yes, then 'Install Software
If iMBVB_ReturnCode = vbYes Then
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "%comspec% /C C:\Progra~1\TIVOLI\TIVPOST\POSTEMSG.EXE -S tmrdev -r HARMLESS -m Winzip-v9_Defaultv1.0 hostname=%computername% Workstation_Build user",1,True
End If
'If answer is no then exit install
If iMBVB_ReturnCode = vbNo Then
WScript.Quit
End If
'--------------------------------------------------------------------------
Any help getting the script to find and parse the file to the end, and then perform an action would be greatly appreciated.
pdg777
|
|
|
|
|
This has "Awful Nightmare" written all over it. Although it is possible to do, there are far better software metering solutions. Your biggest problem is going to be licensing. For example, you can't just install Office (a HUGE install for Tivoli!) on any number of workstations you want. You'll have to uninstall the software before you can install it somewhere else. Another problem is bandwidth. Installing and uninstalling the same apps constantly can choke a network. Just imagine copying out the 500MB app to 10 workstations all at once. Not to mention the mandatory reboots that some software installs require.
Another problem you have is monitor the log file. Tivoli installs are totally background and it's not known for doing thing very quick. Tivoli is lazy, to say the least. What happens when the user logs off or reboots the workstation and doesn't log back on?? Your script won't be running to monitor the success or failure.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave,
You are right, it could be a nightmare. However this will only be for Unique applications, and not core applications. In other words, Office will and other core packages will already have been installed by Tivoli. Licensing is a concern, but since the users don't move around, application creep should not be an issue, but will be a concern.
|
|
|
|
|
pdg777 wrote: Licensing is a concern, but since the users don't move around,
Uhhh..."My company has been asked to have software follow the users." So why are you doing this again?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|