I've been trying different things to "READ" the recordset from the "Message Queue". I can read it but with some weird characters. I've tried
ActiveXMessageFormatter
BinaryMessageFormatter
XMLMessageFormatter
So, far I have no luck.
MessageQueue msgQ3 = new MessageQueue("SERVERNM\" + msg.Label, false);
Message msg3 = new Message();
msg3.Formatter = new ActiveXMessageFormatter();
msg3 = msgQ3.Receive(new TimeSpan(0, 0, 30));
byte[] b = new byte[msg3.BodyStream.Length];
msg3.BodyStream.Read(b, 0, (int)msg3.BodyStream.Length); System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
returnVal = enc.GetString(b);
RESULTS:
I try to convert it to String and then deserialize later but I'm getting some junk.
<?xml version="1.0" encoding="utf-8" ?>
hi have written SSIS script and i am using script component to Row count below my code what i have written. and i am getting error below i have mention...after code see the error using System;
} the error Script component has encountered an exception in user code Object is not an ADODB.RecordSet or an ADODB.Record. Parameter name: adodb at System.Data.OleDb.OleDbDataAdapter.FillFromADODB(Object data, Object adodb, String srcTable, Boolean multipleResults) at System.Data.OleDb.OleDbDataAdapter.Fill(DataTable dataTable, Object ADODBRecordSet) at ScriptMain.CreateNewOutputRows() at UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
I am trying to access a table that I know exists and has data. But, when I create a recordset and check for RecordCount, I get a result -1 (no records). When I access the same table (using the same program), it reports (and I can view in a dbgrid) 752580 records exist.
Here's some of the code:
The table is originally copied from another database; I use the following code to be sure the previous connection is closed before proceeding.
If Not adoRS Is Nothing Then If adoRS.State = adStateOpen Then adoRS.Close Set adoRS = Nothing End If If Not DbConn Is Nothing Then If DbConn.State = adStateOpen Then DbConn.Close Set DbConn = Nothing End If
Then a new connection (it works) is opened to access the database with the copied table:
I used adodb connection and recordset in script task. but i have an error saying adodb is not defined. how do i add it to reference? or, is adodb can run in script task or only ado.net?
I use SQLOLEDB Provider It is not stored porcedure but program code
create new global temporary table with CREATE TABLE ##tmp123 (... create and open a recorsset to populate it as direct table at the open stage I get the following error: Invalid object name '##tmp123'
I have an application which runs successfully on a couple of my customer's machines but fails on a third. It seems to fail when opening the database:
Unable to cast COM object of type 'ADODB.CommandClass' to interface type 'ADODB._Command'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B08400BD-F9D1-4D02-B856-71D5DBA123E9}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=false; Initial Catalog=lensdb;Data Source = SQL
Before I got this error I was getting another problem (sorry didn't make a copy of that error's text) that made me think that adodb.dll simply wasn't loaded/registered. I got rid of that error by copying my adodb.dll onto the third machine and running gacutil /i. There is now an entry in winntassemblies for adodb.
Just in case you think it could be an obvious registry problem: when I started getting the current error I thought that maybe the registry needed updating and I merged the following lines into onto the target machine (from my dev machine):
I've an asp.net application that generates tons of messages (a few hundreds/Second, depending on load of requests). Basically, I need to consume those messages (doesn't have to call "message" even) into sql server table. Each message being a new row in a table.
I tried a few things but failed to satisfy the performance. I tried to put the messages in MSMQ and then have either the MSMQ trigger to process the message or Windows C# service to process message. The performance is horrible.
I'm thinking to send messages directly to SSBQueue and have sql server process it. Is there any async way of doing this so the performance would not be a problem? Anyway I can use WCF + SSB to solve this problem?
Can anybody suggest better approach? Buying a decent hardware or SQL Server 2005 is not a problem.
Rushi, if you are reading this post, sorry for the repeatation, I know I emailed you a few hours ago...
I'm in the process of doing the initial research for the architecture of a large scale, transactional messages routing platform.
My initial design called for a series of MSMQ queues and Windows Services, written in C#, to process the messages in these queues. There will be incoming and outgoing queues, queues to store unroutable messages, etc.
My application will be routing many hundreds of thousands (and eventually millions) of messages per day. These message are very small (< 200 bytes each) and must be routed very quickly. (<1 second processing overhead per message for high priority messages.)
Using the term "routing" may be a bit misleading. The messages arrive via TCP socket connections. I will just need to take in a message, examine its intended destination, and send it to one of several outgoing socket connections, likely on different machines. Some messages require higher priority routing than others, but I don't need multi-hop routing or anything like that.
Of great concern to me is that there are absolutely no single points of failure in the system. Because of this I was considering using a combination of MSMQ and Windows Services in a Clustered environment.
Can the Service Broker provide me with this kind of functionality? If so, how well does it perform and scale? Is it a better choice for messaging applications that require high transactional throughput than MSMQ?
I'm just trying to get an idea of what products/services I should look into further.
I want to Export a List of the Public Queues using the command prompt. Can this be done. I don't want to always click the Export List button. I eventually want to automate the Export List so I can create an Environment HealthCheck.
Used to work fine: (windows 200 server, sql server 2000, JDBC driver SP2.) Two java processes, one sending messages (using jdbc and sql as temp storage), second is receiving and placing on msmq.
After installing SP3a for SQL server, under high load (200 a sec) there are missing messages in msmq. Installed everything from scratch on separate machine, works fine until SP3a is applied. Any help is highly appreciated
Firstly the disclaimer: im a total SSIS bunny. Ok, with that out of the way... What i want to do is have data read from an MSMQ message (which will be a simple XML message) and have it transformed and inserted into a simple table. Sound simple, but i cant work out how to do it.
I started a new Integration Services Project and dropped a Data Flow task on the Control flow tab, then double-click it to go to the data flow tab. I have added a MSMQ connection manager which points at my private queue and i can hit the test button and it sees it tests ok. How do i wire that into my data flow?
On my dataflow tab i have a SQL Server Destination (set to the local SQl server instance) and ive been trying a DataReader source and try setting the Advanced Editor "Connection Manager" column on IDBConnection row to point to my MSMQ connection manager. I get some error "cannot aquire a managed connection from the run-time connection manager". How do i get a Data Flow source which reads the XML message off my MSMQ connection manager??
On the Control Flow tab you can add a Message Queue Task and i can bind it to my MSMQ connection manager and set it up as a recieve task etc, but how do i use that?
I'm working on the design of a system that will have two queues. The first queue will take requests to do something. The second queue will hold the results of having done something. Both queues won't necessarily be on the same physical server. Clients reading/writing to the queue will not be using SQL server. Web service/WCF interfaces will be developed to interrogate/manipulate queues.
My question is: which is better - MSMQ or Service Broker; if I want reliable queues. I can affort to loose items off the first queue, but cannot afford to loose any result data on the second queue.
I have an SSIS package which writes to a configured public MSMQ. When run directly through Visual Studio, file system or msdb it works fine (I guess these use me as the user). However, when I schedule it through an SQL Agent Job it fails with the following:
Failed to write message ... to the queue.
This seems like a permissions thing to me, but I've tried giving full control to everyone in the MSMQ permissions, also explicitly giving full control to the user that the agent job executes as. Neither made a difference.
Any help would be greatly appreciated. Cheers, Tony Vaughan.
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 ----
I currently have an access database that is being converted to strictly a Front-End and SQL as the back-end. simple code conversion from DAO to ADODB? I would be very grateful for the infinite wisdom that resides within these boards.
Option Compare Database Public LngLoginId As Long Function LogMeIn(sUser As Long) '/Go to the users table and record that the user has logged in '/and which computer they have logged in from Dim Rs As DAO.Recordset
my code is using ADODB connection to connect to SQL (Virtual) Server.the way it being done is (c++):ADODB::_ConnectionPtr m_dbConn;ADODB::_RecordsetPtr m_dbRst;m_dbConn.CreateInstance(__uuidof(ADODB::Connection ));m_dbRst.CreateInstance( __uuidof( ADODB::Recordset ));m_dbConn->ConnectionString=( L"DSN=mydsn" );m_dbConn->Open("","sa","",-1);lately after installing SP3 over SQL2000, it was impossible to connect- the error message showed: login failed for user 'null)'. reason: notassociated with a trusted sql server connection.so i changed the connection string to:m_dbConn-> ConnectionString =(L"DSN=mydsn; UID=sa; PWD=;");m_dbConn->Open("","","",-1);and now it works !!what is the reason for that ?what in sql SP3 interrupt for this kind of connection ?what is the difference ?
Most of the the time my connection is created and closed fine.
However, sometimes I get Connection failures (these happen often because I am connecting to the server using a VPN connection). Once I get the connection failure, sometimes I cannot successfully recreate the connection until I kill the application and restart it. Below is my open and release code. I call release anytime the connection fails or a stored procedure fails. If you see anything wrong with it the code below that would prevent the connection from recovering please let me know.
I have developed an application in vb.net 2005 Standard Edition and is running fine in my local machine. The executed version of the same application i tried to run in other machine and getting an error as follows :-
" Unable to install application. The application requires the assembly ADODB Version 7.0.3300.0 be installed in the global assembly cache (GAC) first "
I am using SQL 2005 DB and i connect it using PHP. I have one Store procedure in SQL which requires 1.5 minutes to get result.
I'm always getting error message in web after 30 seconds that Microsoft OLEDB provider for ODBC drivers, timeout expired.
I increased time in php.ini but the error comes from SQL Server. Can you please guide me to increase the time in SQL. so that timeout doesn't expired. This will help me a lot.