Geting Event From ActiveX Into Database

Jul 20, 2005

Hello everyone,

I was wondering. Is it possible, to recive an event from ActiveX into
database?
I was looking alredy with notification services, but I think that's
the wrong way.

Lets say, that there is a ActiveX which realize some tasks.
The database trigers the ActiveX like below:

================================================== =============

declare @iRetValint
declare @iObjectint
declare @sPropertyvarchar(2560)
declare @sSource varchar(1000)
declare @sDescription varchar(1000)
declare @sLog varchar(1000)
declare @dDateEVT datetime
declare @sText1varchar(10)
declare @sText2varchar(10)
declare @iProperty int

set @iObject = 0
set @dDateEVT = getdate()
set @iRetVal = 0
set @sText1 = '0000000000'
set @sText2 = '0000000000'
set @iProperty = 7

exec @iRetVal = sp_OACreate 'MComponent.pidMess', @iObject OUTPUT,1
EXEC sp_OAGetErrorInfo @iObject, @sSource OUT, @sDescription OUT
IF @iRetVal <> 0
begin
set @sLog = 'LOG1: No object created. Source: ' + @sSource + '
Description: ' + @sDescription
print @sLog
end

-- Method
exec @iRetVal = sp_OAMethod @iObject,'Send_FromA', @iProperty
OUT,@nMessageNr = 5, @bstrDateTime = @dDateEVT, @textFromA1 = @sText1,
@textFromA2 = @sText2
EXEC sp_OAGetErrorInfo @iObject, @sSource OUT, @sDescription OUT

IF @iRetVal <> 0
begin
set @sLog = 'LOG3: Source: ' + @sSource + ' Description: ' +
@sDescription
print @sLog
end

PRINT 'Property from method:'
PRINT @iProperty

================================================== =============

This function works properly. I recive the data into ActiveX.
After the ActiveX process the data, it returns the event, wit a
response for this call of method.

Now ... how do I can get, this event into SQL server?
Is it possible to do that enyhow, without acctions like:
- do, that the ActiveX writes the data in to a interface table, where
from it will be readed.

Any help would be appreciated

Mateusz

View 3 Replies


ADVERTISEMENT

Geting Money Type From Sql

Jul 19, 2004

hi

i am retriving value from sql server database like

select cast(round(12345674.8658,2,0) as decimal(20,2))

output is 12345674.87
but i want to get like 12,345,674.87
any function is there?

View 1 Replies View Related

Geting Wrong Data

Oct 2, 2001

See the following query:

" select a.name from tbcity a, tbemp b "

There is a column "name" common in both the tables tbcity & tbemp.
Here we are not referencing or getting the column name from tbemp
but still it will give the records from the table tbemp also.
It is returning the number of records from tbcity multiplied by
the number of records of table tbemp.
if there are 10 records in table tbcity & 5 records in table tbemp
then instead of returning only 10 records it is returning 50
records.Very strange...!
if there is no records in table tbemp then it is returning zero
records.

So please suggest me the solution and why it is behaving in such
a strange manner.

Prashant.

View 2 Replies View Related

Geting The Last Inserted Row For Each CLIENT. How?

Nov 10, 2006

Hi,

I have a CLIENTS table with pk CLIENT_ID, and a CONVERSATIONS table where
CONV_ID and CLIENT_ID form the pk, there is another column CONVERSATION_DATE
where the conversation data is registered (and other columns).

Now I need to retrieve, for each client, the last N (for some clients,
eventually, less then N) conversations with one T-SQL statement.

Does anyone knows how to do this? Is it possible with T-SQL only?

Thanks.

View 5 Replies View Related

Geting Timeout Error In Application When Inserting Record

Mar 9, 2006

i currently have more tha 3 million of records in my table in sql 7. i am getting timeout error in my web application when i try to insert a record in that table

what could be rhe reason for this? how to avoid this type of problem?

Thanks in advance

View 1 Replies View Related

Script For Geting Stored Procedure List & Content

Oct 12, 2004

How can I get the none system(user defined) stored prcedure list and its content by sql script?

View 3 Replies View Related

Recovery :: Configure Extended Event To Trigger A Mail Whenever Any Event Occurs

Jun 2, 2015

Recently we migrated our environment to 2012.

We are planning to implement Xevents in all the servers in place of Trace files and everything is working fine.

Is it possible to configure Extended event to trigger a mail whenever any event (example dead lock) occurs.

I have gone through so many websites but i never find.

View 13 Replies View Related

DB Engine :: Event Tracing For Windows Failed To Send Event

Oct 25, 2011

My SQL Server 2005 SP4 on Windows 2008 R2 is flooded with the below errors:-

Date  10/25/2011 10:55:46 AM
Log  SQL Server (Current - 10/25/2011 10:55:00 AM)
Source  spid
Message
Event Tracing for Windows failed to send an event. Send failures with the same error code may not be reported in the future. Error ID: 0, Event class ID: 54, Cause: (null).
 
Is there a way I can trace it how it is coming? When I check input buffer for these ids, it looks like it is tracing everything. All the general application DMLs are coming in these spids.

View 2 Replies View Related

WMI Event Watcher Task Continual Firing Event When Not Triggered

Apr 8, 2008

I have been testing with the WMI Event Watcher Task, so that I can identify a change to a file.
The WQL is thus:

SELECT * FROM __InstanceModificationEvent within 30
WHERE targetinstance isa 'CIM_DataFile'
AND targetinstance.name = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\AdventureWorks.bak'

This polls every 30 secs and in the SSIS Event (ActionAtEvent in the WMI Task is set to fire the SSIS Event) I have a simple script task that runs a message box).

My understanding is that the event polls every 30 s and if there is a change on the AdventureWorks.bak file then the event is triggered and the script task will run producing the message.
However, when I run the package the message is occurring every 30s, meaning the event is continually firing even though there has been NO change to the AdventureWorks.bak file.

Am I correct in my understanding of how this should work and if so why is the event firing when it should not ?

View 2 Replies View Related

Help - Security Event Log Posts Error Event ID 560 Every Few Seconds

May 31, 2007

Server 2003 SE SP1 5.2.3790 Sql Server 2000, SP 4, 8.00.2187 (latest hotfix rollup)
We fixed one issue, but it brought up another. the fix we applied stopped the ServicesActive access failure, but now we have a failure on MSSEARCH. The users this is affecting do NOT have admin rights on the machine, they are SQL developers.
We were having

Event Type: Failure Audit
Event Source: Security
Event Category: Object AccessEvent ID: 560
Date: 5/23/2007
Time: 6:27:15 AM
User: domainuser
Computer: MACHINENAME
Description:
Object Open:
Object Server: SC Manager
Object Type: SC_MANAGER OBJECT
Object Name: ServicesActive
Handle ID: -
Operation ID: {0,1623975729}
Process ID: 840
Image File Name: C:WINDOWSsystem32services.exe
Primary User Name: MACHINE$
Primary Domain: Domain
Primary Logon ID: (0x0,0x3E7)
Client User Name: User
Client Domain: Domain
Client Logon ID: (0x0,0x6097C608)
Accesses: READ_CONTROL
Connect to service controller
Enumerate services
Query service database lock state

Privileges: -
Restricted Sid Count: 0
Access Mask: 0x20015



Applied the following fix

http://support.microsoft.com/kb/907460/


Now we are getting



Event Type: Failure Audit
Event Source: Security
Event Category: Object Access
Event ID: 560
Date: 5/23/2007
Time: 10:51:23 AM
User: domainuser
Computer: MACHINE
Description:
Object Open:
Object Server: SC Manager
Object Type: SERVICE OBJECT
Object Name: MSSEARCH
Handle ID: -
Operation ID: {0,1627659603}
Process ID: 840
Image File Name: C:WINDOWSsystem32services.exe
Primary User Name: MACHINE$
Primary Domain: domain
Primary Logon ID: (0x0,0x3E7)
Client User Name: user
Client Domain: domain
Client Logon ID: (0x0,0x60D37C1A)
Accesses: READ_CONTROL
Query service configuration information
Query status of service
Enumerate dependencies of service
Query information from service
Privileges: - Restricted Sid Count: 0 Access Mask: 0x2008D

View 4 Replies View Related

Query Or Script To Get The Event Viewer Event Properties?

Nov 2, 2007



Hi all,


Can we get the event properties by using a query?
Are there any extended stored procuder to get the above?

Scenario:

>Desktop>Right Click on My Computer
>Go to Manage and click
>Expand System Tools
>Expand Event Viewer
>Application

click on one event.We can get the log info which is the manual procudure.

But now i want to get the event properties through the Query analyzer...

Any help would be great?


Thanks,

View 4 Replies View Related

Getting The Database Name In Server-Side Trace Event

Feb 1, 2006

I'm trying to audit all the database activities using Server-side tracein SQL Server 2000.Basically I need to get the login information (login Id, Login timeetc) along with the name of the database.Can some one suggest a way todo that?Thanks in advance.J

View 1 Replies View Related

Server DDL Trigger Event For Database Restore??

May 4, 2007

Hello. is there an event that exists for server level triggers when a database restore occurs? I don't see restore_database as an option in BOL... I DO see



CREATE_DATABASE

ALTER_DATABASE

DROP_DATABASE



Any way to fire a server trigger on a database restore?



We're capturing the other server events but would like to also log and be notified of database restores. Thanks, Bruce

View 1 Replies View Related

EVENT ID 18456 STATE: 16 Login Failed For User 'DOMAIN/user'. [CLIENT: &&<local Machine&&>] Every Minute In Event Log.

Oct 22, 2007

We recently upgraded to SQL 2005 from SQL 2000. We have most of our issues ironed out however about every 1 minute there is a message in the Application Event log and the SQL log that states:

EVENT ID 18456 Login Failed for the users DOMAIN/ACCOUNT [CLIENT: <local machine>]

This is a state 16 message which I thought meant that the account does not have access to the default database. The account is actually the account that the SQL services run under.

Any ideas? We can't seem to figure this one out. We actually upgraded to 2005 from 2000 and had an error appear after every reboot that prevented the SQL Agent from running(This application has failed to start because GAPI32.dll was not found. Re-installing the application may fix this problem.) We did a full uninstall of SQL and reinstalled fresh and restored the databases from .bak files and that is when the EVENT ID 18546 started occuring every minute.

We don't have any SQL heavy hitters here so please be detailed with any possible solutions. That you very much for any help you can provide!

David

View 5 Replies View Related

Database/Table Design Question - Object/Event Model

Dec 11, 2007

Hi,Facts:I created a database to support an application that tracks events ondifferent objects. The two main tables are tbl_Object andtbl_EventLog. Each table has unique ID and on the tbl_EventLog thereis FK for a record in the tbl_Object. The events are inserted all thetime for the same or different objects from the tbl_Object. There areabout 600,000 objects in the tbl_Object and 1,500,000 (and growing)events in tbl_EventLog.Question:The user often wants to know what the last event was for a specificobject.What is the best way of retrieving the last event?Should I simply do a max(eventdatetime) on a specific object? orShould I add a LastEventID column to tbl_Object and update it everytime a new event is inserted? or any other way to implement it?I chose the second method because I didn't think it made sense searchthe event table everytime the user wants to know the last event, but Iwanted to know what the experts thought.Please let me know what you think.Thank you,Oran Levin

View 5 Replies View Related

Trying To Connect To Northwind Database, On SQL Compact Server 3.5, An Error Generated, 'The Event Log Is Full'

Dec 26, 2007

View 1 Replies View Related

ActiveX

Apr 23, 2001

How do I use ActiveX script in DTS to do a 'Save As' on an excel file and
convert that to a tab delimited text file ?

Help is much appreciated.

Hayes

View 2 Replies View Related

ActiveX

Jan 29, 2004

I have to put some ActiveX code in the first step of a DTS package, which will search thru all the files in some folder and if it finds a file with filename starting with "Test" (like TestFile.txt), the script will rename it and then use it for transforming data to SQL tables.

In VB Dir$ function could have been used, what should I use in ActiveX?

Thanks a lot for your help

View 3 Replies View Related

Is Xml ,activeX Necessary For A DBA?

Sep 26, 2006

hello friends, i heard from my colleagues that xml and activex are necessary for DBA

is it so? how could we use in our daily activities?

can any one provide me good links for this concepts please?

thank you very much.

View 8 Replies View Related

DTS Error (ActiveX)

Apr 28, 2005

Hello,
I have a DTS package that has an ActiveX task.  This task works with access to create databases and push out data to them.  The problem is, I'm getting an error trying to establish a connection to the SQL Server database as such:
set objConn = Server.CreateObject("ADODB.Connection")
I get this as a resolution:
http://support.microsoft.com/default.aspx?scid=kb;en-us;201740
But I wasn't sure since I'm not dealing with ASP.  I'm trying to run the task as myself manually, not scheduled also, for testing purposes.  Any ideas?
Thanks.

View 1 Replies View Related

STOREPROCEDURE + ACTIVEX DLL

Aug 12, 2000

Hi there,
Can I be able to call a Activex DLL from Sp or from triggers.

Sachi
Looking for a answer..

View 1 Replies View Related

Activex Question

Jan 19, 2001

I'm attempting to write my first activex script. Not familiar with VB script so bear with what might seem like a simple question.

I'm trying to use an activex script in a dts to do a transformation. I have all the columns as straight copies except for one which I'm doing an activex script. What I'm trying to do is if the date is less than 1900-01-01 I want to default it to 1900-01-01. Every once in awhile a date comes across from the source file with a date of 0001-01-01 which sql doesn't like so I want to default it to 1900-01-01 instead. The script I've created parces fine but when I run the dts I get an error that the activex script encountered an invalid data value for source column LLAI. I don't understand why. any suggestions would be greatly appreciated.

Here is the script.

Function Main()
If DTSSource("LLAI") >= "1900-01-01" Then
DTSDestination("LastActivityISODate") = DTSSource("LLAI")
Else
DTSDestination("LastActivityISODate") = "1900-01-01"
End If

Main = DTSTransformStat_OK

End Function

View 1 Replies View Related

ADODB And ActiveX

Jan 19, 2000

Hi,

Am having trouble writing to a table on the SQL 7 Server database, using a DTS ActiveX script.

When I try a .ADDNEW function, the following error comes up.
"The opperation required by the application is not supported by the provider."

The line preceding the .ADDNEW are as follows.
-----
SET Conn=CreateObject("ADODB.Connection")
SET RS = CreateObject("ADODB.RecordSet")
Conn.ConnectionString = "PROVIDER=SQLOLEDB;DATABASE=DataIn;User ID=sa;Password="
Conn.Open
RS.Open sqlSites, Conn
----

Q - Whats wrong ?

View 1 Replies View Related

ActiveX Error

Oct 17, 2003

I get this error msg when I run my ActiveX script in a DTS package.

Err number: 429
Err Message: ActiveX component can't create object

When I Set crApplication = CreateObject("CrystalRuntime.Application.9")

if Err.Number <>0 then
'I get the message here

ne one know what this is about? I'm running this package on SQL server 2000 with Admistrative access

View 5 Replies View Related

ActiveX In A SQL Agent Job

Feb 22, 2005

Hi all,

I have a problem with a SQL Agent JOB on SQL 2K SP3 installation (on Win2K Server).

SQL Agent is running under a domain account with local Admin privileges and SA privileges in SQL server.

A job with an ActiveXScript step fails with "Permission denied: 'CreateObject line..."

If I execute the same ActiveXScript as cmdexec step (calling CSript with the VBScript as parameter) it works without any problem.

The ActiveXScript for reference:
Dim oXls
Dim oWorkBook
Dim oSheet

Set oXLS = CreateObject ("Excel.Application")

oXls.Visible = True
oXls.DisplayAlerts = True

Set oWorkBook = oXLS.WorkBooks.Add
Set oSheet = oWorkBook.ActiveSheet

oSheet.Name = "Test AG"

oWorkBook.SaveAs "C:TempTestAg.Xls"
oWorkBook.Close

Set oSheet = Nothing
Set oWorkBook = Nothing

oXls.Quit
Set oXlS = Nothing


Does anybody have any idea why approach 1 fails while approach 2 does work happily?

View 2 Replies View Related

Not Able To Access DB From ActiveX DLL

May 12, 2001

Hi all,

I am getting following error message due to which i am not able to access database

Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed- User: _ Reason: Not defined as a valid user of a trusted SQL Server connection.
/myhome/adduser.asp, line 28

I using ODBC DSN with NT authentication. I am accessing Data from SQLServer 6.5 using ActiveX DLL. I used ADO to connect to the database in DLL

Can u help me out ?

Thanks & Regards
Rajanikanth

View 1 Replies View Related

ActiveX Script

Aug 19, 2004

I ran this activeX script with my DTS package. For debugging purpose I included the message box. The message is showing the actual name of the file but the the file name is not changing to the name display in the message box.

Function Main()
ms_year = year(date())
ms_month = month(date())
ms_day = day(date())
ms_date = ms_year & "_" & ms_month &"_" & ms_day & "_"

dim objFSO, strFullNm

set objFSO = CreateObject("Scripting.FileSystemObject")
strFullNm = DTSGlobalVariables("FilePathRoot").value & "IMS_ALL_DONATIONS.txt"

'check to see if file exist and then concatenate the file
if objFSO.FileExists(strFullNm) then
strFullNm = DTSGlobalVariables("FilePathRoot").value & " " & ms_date & "IMS_ALL_DONATIONS.txt"
MsgBox "This is the new filename: " & strFullNm
else MsgBox "File does not exist"
end if

set objFSO = nothing
Main = DTSTaskExecResult_Success
End Function

View 1 Replies View Related

DTS Job ActiveX Script Help

Mar 9, 2005

I have a DTS Package Job that needs to pre-check a txt file (see below) with a 'Date' in it. TO compare it with the current Date (execution Date -> today). If they match, move on to the next step and fail otherwise. I don't know how to create an ActiveX script to do this kind of comparison.

-----------------------------------------------------------------------
Volume Unit Referred SBR Used Recfm SSNE BlkSz Dsorg Dsname
5GSL4B 6760 2005/03/09 1065535 FB 3000 27000 PS 'AAS3P.QT.SECMRK.ZXWSDB.FULL.UNPACKED'
-----------------------------------------------------------------------

Thank you for any suggestion!

J827

View 1 Replies View Related

Activex Error And Dts

Oct 6, 2005

I am tying to run this DTS:
the job has an activex part which uses :
"Set fso = CreateObject("Scripting.FileSystemObject")"
this row gives me the following error:
"ActiveX Scripting encountered a Run Time Error during the execution of the script. "
the dts worked when I run it local on my station but when I try running it on the server this error comes
can u help???
10x

View 1 Replies View Related

Activex Script

Aug 2, 2005

Hi gurus,
I am trying a accomplish a mail task which gets its information from the tables. iam using DTS[Activex and send email tasks].

table info:

agentid agentmail orderno
1 xx@hh vinet
2 xy@hh husk
1 xx@hh husk

i need to loop through all the table(currently iam doing it using global variable) and send mail to the agents with messagetext as there orderno(s)
I figured to send mail when an agent has one order but iam stuck when the agent has more than 1 order .
Can you anyone please help /advice any better solution.

Thanks
Cindy

View 8 Replies View Related

Activex Script

Feb 26, 2007

Gurus
I have a DTS running in Sql Server 2000 and it is a Activex script.Now i want to migrate this DTS in 2005?Can you please explain the steps..
My problem is when i execute this package in 2005 in busines intelligence studio it turns red..
What does that mean?Itz a simple script which calls some URL

Please help
Regards
Nitin

View 16 Replies View Related

ActiveX In SSIS

Nov 19, 2007

I migrated the DTS from 2000, and the migrated SSIS which includes ActiveX script is 11KB, takes 00:00.125 running. I rewrote the SSIS using some new features provided in BIDS, and the new package is 50KB, takes 00:00:6.016 running. Is that normal or maybe because of the efficiency of my code?

thanks.

View 1 Replies View Related

ActiveX Info

Jul 20, 2005

I'm getting a little confused about what is supported in MS-SQL ActiveX andwhat is Visual Basic and what is VBScript. Can someone please point me to awebsite, recommend a book or if I've missed it where in the MS-SQL help thatdeals with the ActiveX supported in SQL. I'm not looking to do web pagesASP, ect. I'm looking to use the ActiveX as add on funtionality to supportthe Stored Procs I write.Thanks,-p

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved