|
Looks like VBScript to me not Javascript. Perhaps you might get an answer in the Web forum?
|
|
|
|
|
I like to show my forms with silverlight option, is it possible? This is the first time I am trying...
My idea is while the datas are readonly, then the form opening time if we show the silverlight option then the user can easily identify that it cannot be change...
So, Any better guidences...
Thanks...
|
|
|
|
|
|
Hi mates,
I'm currently working on vb.net with access mdb database, actually this is an access existing application.
Because converting access application to vb.net is not a good result. So, I create forms in vb.net from a scratch
but I just re-used the access tables. Now, the problem is every time I have a query,it will
successfully (insert,update,delete) but when I close the application and run again. The datas that have insert/update/delete
are still their. Why is it that my data are not updated?
Thank is advanceC# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
modified on Thursday, February 25, 2010 9:00 PM
|
|
|
|
|
You need to provide us with source code for your queries, as it is not possible to tell what is wrong from the info you have given us.
|
|
|
|
|
Actually theres no error in my code. Anyway, heres my code snippet.
Private Sub btnUpdate_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnUpdate.Click
sb = New StringBuilder
sb.Append("UPDATE [T_Analysis] SET ")
sb.Append(" [OrderDate]= '" & Me.txtDate.Text & "'")
sb.Append(",[OrderName]= '" & Me.txtOrderName.Text & "'")
sb.Append(" WHERE [OrderNo]= " & Me.txtOrder.Text & "")
ADOExecute(sb.ToString)
End Sub
[Module]
Public Sub ADOExecute(ByVal ssql As String)
Dim sqlexec As Integer
Dim adocmd As ADODB.Command
Dim adocon As New ADODB.Connection
Try
adocon = New ADODB.Connection
adocon.ConnectionString = adoconstr
adocon.CursorLocation = ADODB.CursorLocationEnum.adUseClient
adocon.Open()
adocmd = New ADODB.Command
adocmd.ActiveConnection = adocon
adocmd.CommandText = ssql
adocmd.Execute(sqlexec)
rowsAffected = sqlexec
Catch ex As Exception
log.Debug(ex.ToString)
Throw (ex)
Finally
If adocon.State <> ConnectionState.Closed Then
adocon.Close()
adocon = Nothing
adocmd = Nothing
End If
End Try
End Sub C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Your Access database is being copied to the bin folder of your app every time you compile and run it. Now you have to two copies of your database. The original one that was added to the project and the copy that is being used by your app every time you run it. So, if it's being copied every time you run the app, all of the changes your code makes to the copy are being overwritten when you start the app again.
|
|
|
|
|
Exactly you are correct. I just check this time and this is the two folder you are saying. Now, I know why they are overwritten every time I start the app again. What can you suggest or I should do so that I can use only the access database inside the project folder not the bin folder.
Heres my config file.
(connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Database\DrinkingWater.mdb;Persist Security Info=True"<br />
providerName="System.Data.OleDb" )
C:..\\Visual Studio 2005\Projects\DrinkingWater\DrinkingWater\bin\Debug\Database<br />
Inside the bin folder<br />
{DrinkingWater.ldb} → lock <br />
{DrinkingWater.mdb} → database<br />
<br />
C:..\\Visual Studio 2005\Projects\DrinkingWater\DrinkingWater\Database<br />
Inside the Project Folder<br />
{DrinkingWater.mdb} C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
That would require you to write your code specifically to handle the case where the database file is sitting X number of folders above where your app is. It's a bad idea to write your application like that. All you do is click on the database file in the Solution Explorer, then look in the Properties window below it (by default!) There is a Copy to Output Directory property there. Change that option to "Copy if newer" and the file will no longer be copied to the bin folder unless you update the database file in the Project folder.
|
|
|
|
|
Hi Dave. This is AWESOME!
A big thanks to you mate. At last, I solve this problem, i did not notice that I should change that output directory to "Copy if newer". Thank you so much.
Whew!!! I can sleep now.C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
I learnt something today too. I was waiting to see what the answer to this was!
|
|
|
|
|
And maybe it will be more interesting on Vista or Win7 if you create a setup ...
|
|
|
|
|
Hello To all,
Actually i want to print the Richtextbox Content. There are a Diffrent Texts(Bold,Italic,Different Size ,Different Fonts ),Image Hyperlink,Icon.
So Please Help me for doing that.
ThanksIf you can think then I Can.
|
|
|
|
|
I think the best way to do that would be to save the contents into a Rich Text Format(.rtf) file and then print that file contents.
|
|
|
|
|
How can it possible. Print Format Should be needed. If you can think then I Can.
|
|
|
|
|
Have a look at this[^] MSDN article.
|
|
|
|
|
Have a look here[^].
Worked for me."I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
hi there,
can anyone help me, i want to can be able to read ym message archieve in offline mode, i try to develop a program using vb6 code because only that code i can use, but i stuck in reading the dat file in yahoo, when i can open it, that shows symbol2, can anyone help me to solve my problem. thanks a lot
|
|
|
|
|
You're going to have to get the documentation on the archive file format in order to read it directly. I have no idea if Yahoo Messager (I'm assuming this is what you are using!) exposes a COM object model you can use to read the file. Again, that's going to be information provided by Yahoo.
|
|
|
|
|
Hi,
I'm developing an application (lets call it desktop) which acts like a desktop with a taskbar at the bottom. Desktop runs mulitple instances of a non .net applications which can open text files or pdf files. I've developed a dll that the non .net programs uses to open the pdf's or text files and make the resulting application window into a child window of desktop. I currently have a timer which ticks once a second and checks to see if any new pdf/text files have been opened by the non.net applications and if it finds them it adds them to desktop's taskbar and menus:
Private Sub windowtimer_Tick(ByVal sender As Ob...
Dim window As IntPtr = apiFindWindowEx(Me.Handle, 0, "AdobeAcrobat", IntPtr.Zero)
If CInt(window) > 0 Then
.
.
.
Dim window2 As IntPtr = apiFindWindowEx(Me.Handle, 0, "notepad", IntPtr.Zero)
If CInt(window2) > 0 Then
.
.
.
End Sub
This works fine, however it's a bit resource intensive and with 30 or more people running desktop on a server with all the other non.net applicatins at once it's bound to slow things down.
The question I'm getting round to asking is - Can I use the dll that is opening the pdf/text files to call a routine in desktop so that it can add them dynamically without checking every second? Also, I use the timer for a clock aswell so would it make much difference?
Sorry for the essay!
Chrismodified on Monday, March 1, 2010 9:26 AM
|
|
|
|
|
Your dll could use mutex to communicate to the desktop once it launches a program. 'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I can think of a few ways of doing what you want.
1) If the DLL that your non .net app is using is a com visible .Net assembly then you could look to implementing the use of MessageQueues (see System.Messaging namespace)
2) Less eligent method would be to update a text file somewhere one the user's system, containing the details of the open documents. The use the DirectoryWatcher component to monitior for when the file changes.Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks for that. Yes it's a .net assembly so I'll look at MessageQues I think as I don't want to have lots of text files for each user.
|
|
|
|
|
For anyone interested, here's how I've done it...
In 'desktop' I create a messageque called the handle off the application:
MessageQueue.EnableConnectionCache = True
MessageQueue.Create(My.Computer.Name & "\private$\" & CStr(Me.Handle), False)
I've then written a sub called txtpdfchech to start checking the message que:
Dim que As New MessageQueue(My.Computer.Name & "\private$\" & CStr(Me.Handle))
que.Formatter = New BinaryMessageFormatter
AddHandler que.ReceiveCompleted, AddressOf txtpdfrecieved
que.BeginReceive(New TimeSpan(0, 0, 1))
the starts recieving, on a new thread, for 1 second and whether it recieves a message or not starts another sub txtpdfrecieved. At the end of this, it starts the .beginrecieve again:
Private Sub txtpdfrecieved(ByVal message As Object, ByVal args As ReceiveCompletedEventArgs)
.
. Does stuff
.
CType(message, MessageQueue).Purge()
CType(message, MessageQueue).BeginReceive()
end sub
So the DLL sends the message like this:
Dim que As New MessageQueue(My.Computer.Name & "\private$\" & CStr(handle))
que.Formatter = New BinaryMessageFormatter
stringy = stringy & CStr(processtostart.MainWindowHandle)
que.Send(stringy)
where handle is the handle of desktop recieved from the non.net application and processtostart is the notepad or adobe reader just opened by the dll.
Chris
|
|
|
|
|
Good day,
Not sure if should rather be under ASP or embedded, but I am doing the development in vb.net.
I can't quite figure out how to proceed with this problem. just need someone to point me in the right direction.
I have a VB (VB 2008 Express) windows form app that connects up to a SQL express DB . Everything works fine there. I created a datalayer class and a business layer class. The datalayer handels all database connection functions and the business layer handles search functions that returns datarows and several other lookup and update functions.
Now I want a Windows CE symbol bar code scanner (vb.net 2003 compact framework 1. Framework 2 to big for device memory) to connect up to the vb app.
Eg.:
I have a function in the business layer class that checks for duplicate numbers scanned. I want the CD device to scan the number and then feed it to the function in the business layer. But I think it might not work if I create the business object on the device. I need business class to reside on the server. ASP? Web service?
As I say not sure where to go from here. It also seems that VB .net Express cannot create web services and ASP websites. you need Visual Web developer 2008 express edition for that. Not sure how to link the two.
I would appreciate any advice.
Thanks
|
|
|
|