|
Have any of you used the report viewer in any of your own application ? Or is it only for the teacher starter kit ( vb express edition)
ihe
|
|
|
|
|
I have this error when i run my function...
i wonder did i use my method wrongly.. pls help.
Runtime error:
Command text was not set for the command object.
HEre my coding :
Set cn = New adodb.Connection
cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source= db1.mdb"
cn.Open constr ' constr is a connection string
sqlsql = "delete from [DO] where no = " & dono.Text
cn.Execute strsql, adExecuteNoRecords
|
|
|
|
|
You put the query in the variable sqlsql, then you try to use the variable strsql.
You should use Option Explicit, so that you can't create variables by mistake like this.
---
b { font-weight: normal; }
|
|
|
|
|
I looked straight through that piece of VB nastiness when I read it before, it's not something that would have occured to me as possible ( for the language to magically create undeclared variables )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
VB is very "nice", and automatically declares any variables that you use, unless you use Option Explicit to tell it not to.
Using Option Explicit is one of the things that turns VB from a toy to something that you can use just like if it was a real programming language.
---
b { font-weight: normal; }
|
|
|
|
|
I have RTF format data(Text and Images) in a Access database tabel( Datatype of the Tabel field is Memo) which i need to display in Crystal Report. When i am doing so i am able to see the Text but not the Images. I had changed the TextFormat Property of the field in Crystal Report to RTF.
What else should i have to do for the reqirement...
Can anyone Help...
Any Links or Articles which might help....
Jats
|
|
|
|
|
How to draw a organisation chart in Crystal Reports of VB.NET 2005. Or is there any free software/Active X available for the creating organisation chart.
Regards
Riyaz Zujer Patanwala
I.T.Programmer
Al Jaber Energy Services
P.O.Box 47467
Abu Dhabi
U.A.E.
|
|
|
|
|
hi
i m having dll file that can be used to send sms from pc but the problem is that i m using pocketpc that is connected to usb port and script i m having using com port. how we solve this problem. Is there any script available that is used to send sms using usb port
if it is please tell me
Thanks,
Nitu
-- modified at 1:11 Wednesday 23rd August, 2006
|
|
|
|
|
I was trying to use a hand icon cursor which i have the image i put it as a picture and call it when mousemove
-- Here my coding:
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.MouseIcon = Picture1.MouseIcon
End Sub
I wonder is there easy where to do it? i found in the properties :mouse pointer and mouse icon but i not sure how to use them, dont really have then hand cursor.
I'm using VB6 .
|
|
|
|
|
Cursors.Hand is what you want. What are Image1 and Picture1 ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
the image and picture is the item i want when i move my mouse to there and the cursor will change to a hand. is VB6 the properties have that function?? i dont really seen it...
how do i manually code it ?
|
|
|
|
|
Oh, this is VB6 ? Then I have no idea.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I can't really understand what your talking about. But, it seems liek you want to change the mouse cursor when it is over your images?? I think you're looking for the MousePointer property, not MouseIcon .
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
yes yes but how can i change the image in the Mousepointer property???? cause i cant found the "Hand" image
|
|
|
|
|
VB6 doesn't support it. It only supports the cursors found here[^], plus a custom cursor.
You'll have to to make your own icon of the hand cursor, load it into the MouseIcon property with LoadPicture , then set the MousePointer property to vbCustom , or the integer 99.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have create a watch folder object to c:\temp,
but something, the create event is fired when the large file is not completed.
Is there any existing method of other event to get the event when the document is completed?
|
|
|
|
|
I take it your talking about the FileSystemWatcher. No, there is no event that syas the file has been completely written to and closed. It's impossible to track.
The generally accepted work-around is to catch the File Created event, then try opening the file with exclusive access (DenyShare...). When you're finally able to open the file, the other application should be done writing to it. There are exceptions to this, but it depends on the application that's writing the file.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In my case, I have a file placed on a file server,
I can set the permission about the folder/file.
How can I let the user can read the file in the application I create but they cannot direct access the file out of my application?
|
|
|
|
|
You have to wrap your file access code in some user impersonation code.
|
|
|
|
|
The only way I can see is to encrypt it so only your code can make sense of it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You can't do that. If you give a user permission to open that file, they can open it using anything, including Notepad or some file byte editor. You're only solution, like Christian said, is to encrypt the file so it can't be understood by anything other that your application.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Is it possible to connect or print file in a thermal printer using VB .net?
if it is possible, How to connect or print file/documents in a thermal printer. this printer is a network printer. I've been searching a quit long time but i did not find any article that is related to my problem.
Thanks!
|
|
|
|
|
A printer is a printer, your driver handles communucation to it, no matter how it prints. Any printing tutorial should work, you just need to install it as a network printer on the PC running your program.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I am looking into programming a system information tool as part of a application suite, which I am currently having problems with. At the moment, I have been reading up on the aspects of the WMI at the MSDN section over at Microsoft.
I am wondering if anyone has any example code on making a query as the System.Management doesn't seem to be able to be referenced from the project properties screen and cant't use the Imports System.Management bit of code to include it.
Any help would be greatly appreciated.
Thanks, Andrew Robinson.
|
|
|
|
|
First you need to reference System.Management.dll
Here is some code for retrieving NT Users and NT Groups
Imports System.Management 'Need to reference System.Management.dll<br />
<br />
<br />
Public Module NTDomain<br />
<br />
Public Function GetNTUsers(ByVal NTDomain As String) As DataTable 'This function uses System.Management namespace<br />
Dim dtNTUsers As New DataTable<br />
With dtNTUsers<br />
.Columns.Add(New DataColumn("FullName"))<br />
.Columns.Add(New DataColumn("Name"))<br />
.Columns.Add(New DataColumn("Domain"))<br />
.Columns.Add(New DataColumn("LocalAccount"))<br />
<br />
Try<br />
Dim searcher As New ManagementObjectSearcher( _<br />
"\\" & NTDomain & "\root\CIMV2", _<br />
"SELECT * FROM Win32_UserAccount")<br />
<br />
Dim en As System.Management.ManagementObjectCollection.ManagementObjectEnumerator = searcher.Get.GetEnumerator<br />
While en.MoveNext<br />
Dim queryObj As ManagementObject = en.Current<br />
Dim dr As DataRow<br />
dr = .NewRow<br />
dr("FullName") = queryObj("FullName")<br />
dr("Name") = queryObj("Name")<br />
dr("Domain") = queryObj("Domain")<br />
dr("LocalAccount") = queryObj("LocalAccount")<br />
.Rows.Add(dr)<br />
End While<br />
.AcceptChanges()<br />
Catch ex As System.Exception<br />
Throw New PDM.DBA.GetNTUserListException<br />
Finally<br />
Dim drUser As DataRow<br />
drUser = .NewRow<br />
End Try<br />
Return dtNTUsers<br />
End With<br />
End Function<br />
<br />
Public Function GetNTGroups(ByVal NTDomain As String) As DataTable 'This function uses System.Management namespace<br />
<br />
Dim searcher As New ManagementObjectSearcher( _<br />
"\\" & NTDomain & "\root\CIMV2", _<br />
"SELECT * FROM Win32_AccountSID")<br />
<br />
Dim dtNTGroups As New DataTable<br />
With dtNTGroups<br />
.Columns.Add(New DataColumn("Type"))<br />
.Columns.Add(New DataColumn("Name"))<br />
Dim en As System.Management.ManagementObjectCollection.ManagementObjectEnumerator = searcher.Get.GetEnumerator()<br />
While en.MoveNext<br />
Dim queryObj As ManagementObject = en.Current<br />
Dim sSplit() As String = Split(queryObj("Element"), ",")<br />
Dim sType As String<br />
<br />
If sSplit(0).Contains("Win32_Group") Then<br />
sType = "Group"<br />
ElseIf sSplit(0).Contains("Win32_SystemAccount") Then<br />
sType = "System Account"<br />
ElseIf sSplit(0).Contains("Win32_UserAccount") Then<br />
sType = "User"<br />
Else<br />
sType = "Unknown"<br />
End If<br />
<br />
sSplit(1) = Replace(sSplit(1), "Name=", "")<br />
sSplit(1) = Replace(sSplit(1), """", "")<br />
<br />
Dim dr As DataRow<br />
dr = .NewRow<br />
dr("Type") = sType<br />
dr("Name") = queryObj("Element")<br />
.Rows.Add(dr)<br />
End While<br />
.AcceptChanges()<br />
End With<br />
Return dtNTGroups<br />
End Function<br />
<br />
End Module
Hope this helps, took me a while to sort this out as well.
Regards
Steve Jowett
|
|
|
|