|
Hi friends,
I was create a project in vb6. this project purpose is integrate excel. now am converted in vb 2008. it working fine but form could not visible form status, after load excel this will show while working i could not view the form. how can i solve this problem. help me...
|
|
|
|
|
Hi, I realise that English is not your first language and I am having difficulty understanding what you are trying to say without any code samples to back up your request.
May I suggest that if there is a Google translation facility for your language that you write your request again in your own tongue and have Google translate? Most of Googles translations are not too bad.
|
|
|
|
|
Since you are in the United States you may want to find a friend who is good at English to help you rephase your question.
|
|
|
|
|
Hi,
As the other responses indicate, your question isn't the best. But here is my guess at what your asking [more than likely a millions miles from the actual question, but hey ho, at least i tried!]
You are using Excel Automation and running this from inside VB.net code. You code is running, but you don't see the background automation happening. Close?
When you declare your excel.application object to use with the automation, it has a visible property. Have you set this to True?
|
|
|
|
|
Hello Experts,
Actually I want to know that how to get the Path of Send To Item(Folder,File).
I am Trying to Create a Application which Creates the Log of Data which is insert in Removel Media.You can say it is removable Monitoring application.
So i want to get the file path which is send by Send To.
ThanksIf you can think then I Can.
|
|
|
|
|
One method of doing this is to;
1) Enumerate the drives collection
2) Check which ones are marked removable
3) Export the data to the selected drive in what ever format you need.
|
|
|
|
|
But I want the Source Path Where from the data is coping . If you can think then I Can.
|
|
|
|
|
Ah! so you want to monitor all files that are transferred by the computer to removable media? So you want to know if a file has been copied off of the computer.
I do not think this is a simple as it sounds, you would have to hook into os to do this sort of monitoring.
|
|
|
|
|
Take a look at FileSystemWatcher. That should do what you want perhaps.
|
|
|
|
|
Here is a simple debug output test;
Private Sub printRemovableDrivesList()
Dim Count As Integer
Dim aDrive As System.IO.DriveInfo
Debug.WriteLine("Removable Drives:")
For Each aDrive In My.Computer.FileSystem.Drives
If aDrive.DriveType = System.IO.DriveType.Removable Then
Debug.WriteLine("Drive: " & aDrive.RootDirectory.ToString)
Count += 1
End If
Next
Debug.WriteLine(Count.ToString + " Drives Found.")
End Sub
I had one memory stick plugged into the usb port and ran the function above. Output was;
Removable Drives:
Drive: E:\
1 Drives Found.
|
|
|
|
|
I think you are not thinking the mean of my Question.
if I am sending file in removable media by using Sendto option (Byusing right click in any file or Folder).
Then How Get the Location of Current File Location (Where from the file is copied(Source Path)).If you can think then I Can.
|
|
|
|
|
Hi Experts,
I would like to Synchronize MS-Access database from sql server 2005 database realtime.
One way was to alter the code and make a separate connection string for MS-access in VB for inserts. But what modifying in code is not allowed.
So I have linked the MS-Access using addlinkedserver and established a connection in that and than I have created a trigger in Sql database so that whenever the table of sql will insert it will get inserted in MSAccess too.
Its working from sql server browser very well but not working from vb front. Giving error like 'linked server 'ecapacitor' does not support the required transaction interface.
My trigger is this:
create trigger updmth
on day_trn
AFTER insert
As
begin
commit
insert into ecapacitor...mth_trn
(ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc)
select ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc from inserted
begin tran
end
Please let me have a solution for this. An quick reply will be highly appreciable.
Thanks & Best regards
Jay Khatri
|
|
|
|
|
What happens when you remove the "commit" and "begin tran" statements?I are Troll
|
|
|
|
|
If I remove commit and begin trans, it stops working even in sql browser. But not start to work in Vb6.0.
My connection string in VB for sql server is "Provider=SQLOLEDB.1;Password=" & CURRENT_Password_sa & " ;Persist Security Info=True;User ID=sa;Initial Catalog=" & CURRENT_DATA & ";Data Source=" & ty
My question is if Microsoft Jet oledb insert can be done from sql server why it is not being from vb front end.
One more point Is it a problem of begin, commit of transactions.
Please reply soon.
Thanks & Best Regards
Jay Khatri
|
|
|
|
|
JayKhatri wrote: One more point Is it a problem of begin, commit of transactions.
That was my first guess; the begin tran and commit look like they should be swapped. The "begin" marks everything that gets wrapped in the transaction, the commit says that the transaction can be saved to disk.
JayKhatri wrote: My question is if Microsoft Jet oledb insert can be done from sql server why it is not being from vb front end.
It seems that Access is the main problem here. Microsoft Access doesn't have triggers, that might be the reason why it works from the SQL Browser, and not over the JET-engine.
Are you doing the insert in the SQL Server database with a stored procedure? If so, then you could add your insert -statement for the linked server at the end of that stored procedure.I are Troll
|
|
|
|
|
Hi
I tried all the combinations of commit tran and begin all got failed.
Secondly, It is true the access don't have triggers, so do I go for another sql server db instead of ms-access.
I think finally I must leave try with MS Jet.
Please suggest.
Thanks & Best Regards
Jay Khatri
|
|
|
|
|
JayKhatri wrote: Secondly, It is true the access don't have triggers, so do I go for another sql server db instead of ms-access.
I think finally I must leave try with MS Jet.
Microsoft Access doesn't focus on being a good database-server, that's what it's big brother is for. You can convert the Access database to a SQL Server database using the Upsize Wizard[^]. Next, you could use the SQL Express server to host the database, which is available for free (just like Access).
JayKhatri wrote: I tried all the combinations of commit tran and begin all got failed.
From the trigger, or from the SQL Workbench?I are Troll
|
|
|
|
|
please see this, the last working trigger from sql server. Now vb giving no error but not entering anything in access.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER trigger [updmth]
on [dbo].[Day_Trn]
AFTER insert
As
begin
declare @tmp table (ldtrn decimal, lgl_id int,lacc_id decimal,nentry_id int,sdate datetime, snchcltr tinyint,damt decimal,nchqno varchar(9),spart varchar(50),bdc tinyint)
insert @tmp (ldtrn, lgl_id,lacc_id,nentry_id,sdate, snchcltr,damt,nchqno,spart,bdc) select ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc from inserted
commit
insert ecapacitor...mth_trn (ldaytrn_id,lgl_id,lacc_id,nentry_id,sdate,snchcltr,damt,nchqno,sparticulars,bdc)
select ldtrn, lgl_id,lacc_id,nentry_id,sdate, snchcltr,damt,nchqno,spart,bdc from @tmp
begin tran
end
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
Best Regards
Jay Khatri
|
|
|
|
|
|
The example puts the trigger on the SQL Server-table, and this trigger is executed by the server (and writes to the Excellsheet).
If you're adding data to the MS Access table using OleDb or ADO, then you'll bypass that trigger and it won't execute.I are Troll
|
|
|
|
|
Yes this code was for excel sheet, I got an idea for commit that I had written after insert. Other I had ignored in my case. and yes it is bypassing the trigger.
Is there still any Ray of Light as I have spoken to my senior who is less interested to select another sql db.
Best regards
Jay Khatri
|
|
|
|
|
JayKhatri wrote: Is there still any Ray of Light as I have spoken to my senior who is less interested to select another sql db.
There's some options;
- Find another location to update the Access-table (execute your insert manually, instead of a trigger)
- Use a database that has triggers
- Reverse the entire idea; you can create a linked table in the Access-database. Link it to an existing SQL Server table, and read the SQL Server data from Access. (From Access, go to the tab "external data", choose "more", choose "ODBC", and link to the SQL table)
I don't know which of these three would be most appropriate to you, as that largely depends on what you're trying to accomplish.I are Troll
|
|
|
|
|
Is there a way to find out what distance vertical scrollbar is moved on rtb?
|
|
|
|
|
|
|