How yould i loop trought all the records in a table and fetching a specic record that is flagged and sending for each record found a email with that records data to a mail recipient. this should be part of a step in a sql job. PLZ HELP
can xp_sendmail send on behalf of someone, i.e. i need to send it from a sql profile mailbox, but i need the address to read FROM: Someoneelse@domain.com
i know you can do this easily with XPSMTP, but i need a way to do it with xp_sendmail (sql mail)
Does anyone know if this can be done? I've looked everywhere. This is how my info is appearing in an email... These are the files I requested and this is how it's being displayed. Any suggestions? Requestor Requested Shipped Due ------------------------------------------------------------------------------ ----------------------------------------------------------------------- ----------------------------------------------------------------------- ----------------------------------- ----------------------------------------------------------------------- ---- ------------------------------ ------------------------------ ------------------------------ Approaching the Corporate Heart
klm@yahoo.com 02/07/2008 02/07/2008 02/06/2008 PASSION FOR CUSTOMERS 3 copies
I have a .net web application and need to create a program that needs to check the database every two hours and if data has not been input send the user an email message. I have heard this can be done via SQL Server - events or triggers? Can anyone tell me where I can find example code or more information on this. Thank you in advance.
I am Crystal Reports Developer and I am new in SSIS environment. I have started to read Professional SQL Server 2005 IS book. I am really confused by many tasks to choose.
I need to develop reports from data warehouse. But before I have to send the data from operational database (SQL Server 2000) to warehouse (SQL Server 2005) monthly - I have a script for retrieving the data. For my package, I chose Data Flow Task, Execute SQL Task, and OLE DB Destination, and it does not work.
Please help me if I can look similar packages performing? Thank you!!
I have looked all over my code and can not find anywhere that I am referencing the xp_sendmail procedure! Here is all the code<code>With sqlCmdUpdateParticipants .Parameters("@ClassID").Value = ddlClass.SelectedItem.Value .Parameters("@Person").Value = tbName.Text() End With cnCapMaster.Open() sqlCmdUpdateParticipants.ExecuteNonQuery() cnCapMaster.Close()</code>I am just getting a couple values and and inserting them into the database. the insert works then I get darn error message. This code worked at one time but it has been about 2 years sense I worked on it so who knows what might have happened sense then.Thanks,Bryan
This is my procedure which I need to send the Data into Database, But it does not generate any error and it does not send the information into Database, May I have done wrong, any one to look on that please. Sub Add_To_Cart(ByVal Src As Object, ByVal Args As EventArgs) Dim FVProductID As Label = FormView1.FindControl("ProductID") Dim FVProductName As Label = FormView1.FindControl("ProductName")Dim FVProductPrice As Label = FormView1.FindControl("ProductPrice") Dim DBConnection As SqlConnection Dim DBCommand As SqlCommand Dim sql As String Dim SQLAddString As String DBConnection = New SqlConnection("Data Source=MANDARISQLEXPRESS;Initial Catalog=SHOES;Integrated Security=True") DBConnection.Open() If Not Session("OrderID") Is Nothing Then sql = "SELECT Count(*) FROM ShoppingCart " & _ "WHERE OrderID = '" & CType(Session("OrderID"), String) & "' " _ & "AND ProductID = '" & FVProductID.Text & "'" DBCommand = New SqlCommand(sql, DBConnection)
If DBCommand.ExecuteScalar() = 0 Then SQLAddString = "INSERT INTO ShoppingCart (OrderID, ProductID, OrderDate, ProductName, ProductQnty, ProductPrice) VALUES (" & _ "'" & Session("OrderID") & "', " & _"'" & FVProductID.Text & "', " & _ "'" & Today & "', " & _"'" & FVProductName.Text & "', " & _ "'" & FVProductPrice.Text & "', 1)"DBCommand = New SqlCommand(SQLAddString, DBConnection) DBCommand.ExecuteNonQuery() End If End If DBConnection.Close()
Sub Add_To_Cart(ByVal Src As Object, ByVal Args As EventArgs)
Dim FVProductID As Label = FormView1.FindControl("ProductID") Dim FVProductName As Label = FormView1.FindControl("ProductName") Dim FVProductPrice As Label = FormView1.FindControl("ProductPrice")
Dim DBConnection As SqlConnection Dim DBCommand As SqlCommand Dim sql As String Dim SQLAddString As String
DBConnection = New SqlConnection("Data Source=MANDARISQLEXPRESS;Initial Catalog=SHOES;Integrated Security=True") DBConnection.Open() If Not Session("OrderID") Is Nothing Then
I need to send an email for each row in a dataset. The data set will contain the order number. I need to first look up the order detail based on the order number and put it into an e-mail. Should I use the OLE DB command object for this?
I have set up a multiple server merge replication publication using the following:
SQL server running SQL Server 2005 (SQL server ce server tools installed) Web Server running IIS (Required replication elements installed)
All went smoothly with the installation and I was able to running the diagnostics report from my Pocket PC by browsing the web page url that contains the slqcesa30.dll
http://www.myserver.eu/repdata/sqlcesa30.dll
I then ran the configure web synchronization wizard and setup basic authentication (I am using this purely for test purposes and will reconfigure the security when testing is complete) I then created a user on both the SQL server and the Web Server (identical on both machines) and gave this user the required rights in all objects. I have set up a trial application using visual studio 2005 vb.net on a windows mobile 5 device. When form1 loads the following code is fired:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
'' Configure the DataAdapter for use in UI binding cnField = New SqlCeConnection("Data Source =documents and settingsMobileData.sdf;") daField = New SqlCeDataAdapter("SELECT Id, LatLong, Dateandtimeoffix FROM FieldData", cnField)
'' Configure the update comand Dim cb As New SqlCeCommandBuilder(daField)
Merge() End Sub
Private Sub Merge() Const URL As String =€? http://www.myserver.eu/repdata/sqlcesa30.dll€? '' URL to Agent Const InterNetUser As String = "Fielddata" '' InternetUser Const InternetPassword As String = "Password" '' InternetPassword Const PublisherServer As String = "MyServer" '' Publisher server Const PublisherDatabase As String = "Table_Test" '' Publisher Database Const PublicationName As String = "RepData" '' Publication name Const SubscriberName As String = "Testing" '' Subscriber name Const LocalDB As String = "Data Source=documents and settingsMobileData.sdf" ''Connection string to local database
Using rep As New SqlCeReplication(URL, InterNetUser, InternetPassword, PublisherServer, PublisherDatabase, PublicationName, SubscriberName, LocalDB) Try If Not System.IO.File.Exists("Documents and SettingsMobileData.sdf") Then rep.AddSubscription(AddOption.CreateDatabase) End If rep.Synchronize()
Catch ex As SqlCeException DisplaySQLCEErrors(ex) End Try End Using
SetupDataSetforUI() End Sub
When the code executes I obtain the following error: Index #0 Microsoft SQL Server 2005 Mobile Edition Error: A request to send data to the computer running IIS has failed for more information see HRESULTS. I have looked this up and it appears to be to do with certification? Is this correct I am using HTTP not HTTPS? Any assistance appreciated joebo
i currently have multiple textboxes which input data, i'm wanting the textbox details to be sent to a database, here's how one of the textboxes look: <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' Visible="False" Width="300px"></asp:TextBox> the sqldatasource:<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CommunityDirConnectionString %>" InsertCommand="INSERT INTO email(Name, Department, Email, Subject, Body) VALUES (@Name, @Department, @Email, @Subject, @Body)" SelectCommand="SELECT email.* FROM email"><InsertParameters><asp:Parameter Name="Name" /><asp:Parameter Name="Department" /><asp:Parameter Name="Email" /><asp:Parameter Name="Subject" /><asp:Parameter Name="Body" /></InsertParameters></asp:SqlDataSource> i'm wanting it to fire once the user selects a button, but i'm not sure what code needs to be placed behind the button?
I want to post all the data in my company branch office in Lahore to the Head office in Peshawar. This will be done at the end of the day and the two SQL SERVERs synchronize data between both points over internet. what procedure should i use? and how the two computers will know the ip addresses of each other while connecting?
I have a report that may or may not have data. I have a subscription setup for this report. The subscription has a defined To list. I would like to NOT send the report if there is no data on the report. I did this in SQL 2000 by raising an error from the stored procedure if there was no data. However, that approach does not seem to work with 2005. Is there another way to accomplish this?
Hello, I am using a multicast with 5 outputs, I attempting to pass about four thousand rows to different destinations. However, upon execution only two of the outputs send the rows to the destination. After deleting the multicast and reinserting it, different destinations received the data. The number of destinations is also not consistant, sometimes 3 work and sometimes only 1 works. Thank you.
I have a job that emails out shipment notifications at the end of the day to our customers. The problem I have is I don't understand why the same email is sending out twice within a minute of each other when the job is only scheduled to run once. If I take the code out of the step and run it in management studio it only emails once. I attached the code for one customer for reference. We are running SQL 2008 on a VM sending to an exchange 2010 server.
DECLARE @tableHTML NVARCHAR(MAX) ; SET @tableHTML =N'<H1>XYZ Company ASN For ' + CONVERT(VARCHAR(10), GETDATE(), 101) + ' </H1>' + N'<table border="1">' + N'<tr><th>Vendor</th><th>Delivery Date</th>' + N'<th>Purchase Order Number</th><th>Item Number</th><th>Item Description</th>' + N'<th>Quantity Shipped</th><th>UOM</th><th>BOL Number</th>'
hi alli have a web application on a web server.and another windows application on another computer.there are databases on each of them.how can i send and receive data between these two applications?please reply me as soon as possibleregards
Could somebody please help me to stop sending scheduled report when no data is present in the report? Actually I have a daily report which is sent to the client and in a week, two or three days, data will not be there and thus it delivers blank report to the client.
So how can I stop sending blank mails to the client?
We have a rather large query that takes time to run between each data-driven instance. Is there a way to only send out the first email after the last subscription has finished processing? Any advanced input on data-driven subscriptions .
I have an Execute SQL Task that runs a simple SELECT query. I have the result set = Full Result Set. The variable is of type Object and the value is System.Oject. After successful completion of the Execute SQL Task, I am doing a Send Mail task. For the Message Source, I want to use this Object. The drop down is only listing variables of type String. Can you not use a variable of type Object in a Send Mail Task? If not, what is the easiest workaround? Thanks!
I am trying to complete the BOL sample "Creating a Mobile Application with SQL Server Mobile". Using SQL 2k5 and VS Team Suite. I have the emulator about to get on to the internet and can even get to the http://sqlce.domain.com/sqlmobile/sqlcesa30.dll url but when runing the vb.net code I get the error 28037 "A request to send data to the computer running IIS has failed. For more information, see HRESULT.". Any help would be greatly appreciated. No software firewalls are running. I have a dns entry that points to my laptop for testing. The sync function code is below.
Ok, I'm incredibly new to all of this so please bear with me. I took the Integration Services tutorial, and that's pretty much all that I have done.
I'm creating my first package and I want to be able to email myself when certain non-fatal conditions occur. I still want the entire row to flow into my table.
My understanding is that this type of checking should be done in the "Data Flow" tab not the "Control Flow" tab. However, I can't see a toolbox item in "Data Flow" to create a SQL script like this. I can see that the "Lookup" toolbox item will allow me to write a SQL script but how do I get it to send out the email? Or should I really be doing this type of checking in "Control Flow" where there is an "Send email task" item?
This is just too simple. I must be doing something wrong. I have tried everything, redoing the SQLMobile merge publication, setting permissions, and need help ASAP.
The basic test with the http://localhost/sqlmobile/sqlcesa30.dll returns the message:
SQL Server Mobile Server Agent 3.0
I have tried the merge replication with both my local SQL Server 2005 installation and a remote development box. Both instances return the same error.
I am able create and replicate a database using the sample application:
We have developed a Winmobile 5.0 application using VS2005 and Sql 2005 CE. We have successfuly installed the Server Agent on the web server and using the url 'http://websitename/rdatest/sqlcesa30.dll' have received an acknowledgement from the server agent. When we set up the Web Syncronization Wizard we kept things simple and opted for anonymous access. However, our Sql 2005 is based on a separate dedicated server which can be accessed by the web server. Our website, also written in VS2005, uses the following connection string to access the Sql 2005 database for our website.
When using the following code in our PDA application we have tried the above string as well as another interpretation with the same resulting error 'A request to send data to the computer running IIS has failed, for more information please see HResult'. The code we are using is..
Using rda As New SqlCeRemoteDataAccess() Dim sCon As String = "Provider=SQLOLEDB;Data Source=172.18.22.222; Initial Catalog=Audit ; UserID=steve; Password=letmein" Dim sCon As String = "server=172.18.22.222; database=Audit; uid=steve; pwd=letmein" rda.InternetUrl = "http://websitename/rdatest/sqlcesa30.dll" rda.LocalConnectionString = "Data Source=Program FilesTestSysTestdata.sdf"
Try rda.Pull("Detail", "SELECT Details, Actions FROM Detail", sCon, RdaTrackOption.TrackingOff, "DtlErrors") Catch sqlCeEx As SqlCeException RecError( sqlCeEx.ToString) End Try End Using
Having tried both connection strings we feel the error is caused by something else possibly on our dedicated Sql server. Would really appreciate any help.