Is There Any Possibility To Sync Databases Directly?

Aug 31, 2012

Currently our client has a website where they are using aspx as front end and SQL server as back end. We are developing same functionality using php and my sql.Currently 1 phase of development is finished. They are using both applications to do the job. Now in 2nd integration they are asking the data sync from one database to other.

We have decided once the user enters the aspx form the data will be stored in client sql server but we though of writing a script to enter this info into a csv file so that from our side we access that file and update in mysql.

Other than ftp any other better approaches to access that file on client server?Is there any possibility to sync databases directly?

View 4 Replies


ADVERTISEMENT

SQL 2012 :: Backup Cluster Databases Directly To Tape Using Native Backups?

May 5, 2015

Can we backup our cluster databases directly to tape using native backups (without using any third party tool) ? It's SQL Server 2012 two node Active/Passive cluster. One of the DB will be huge in size, hence checking if we can directly backup from the cluster instance to a tape.

View 7 Replies View Related

Sync'ing 2 Databases

Jul 20, 2005

Hello,I've got 2 databases (both on MS-SQL Sever2k). One of them (remote)contains table which is often updated. For various reasons I'd like tomaintain a copy on local MSSQLServer. Is there any built-in mechanism whichallows to do such things?! I can do this manually, by examining the remotetable contents, and downloading new stuff (local table cannot be modified inany other way), but I guess that there is a smarter way. Any ideas?!ThanksPiotrek

View 1 Replies View Related

Sync Two Mobile Databases

May 25, 2007

Hi,



If I have 2 mobile databases, 1 on my desktop and the other on a PDA, how do i synchronize both these database? Are there any vb samples where i can refer to?



thanx

View 4 Replies View Related

Sync To Databases Nightly With BLOB Data

Dec 10, 2005

I need some assistence here.I have two servers. One with MS SQL 2000 Standard edition and MSDE(MSdesktop engine).I need to sync my databases nightly, as a backup.Is there a cheap software that will do this? I don't want to justbackup the entire databases files b/c they are large and I'mtransfering them over DSL.I was thinking transaction logging, but I'm not sure. Is there a easyway to do this?I don't know how to accomplish this task.PLEASE HELP.

View 9 Replies View Related

Sync/Merge Local Sql Compact Databases To Single Global Database

Jun 23, 2007

Hi, I have compact sql databases which will be local on multiple users
devices. Due to space constraints, for one of the tables i have had to use
auto incrementing integer which works fine for the local database but i
would like to merge all of the users databases into a global database. The
table format can be seen below:




Code SnippetCREATE TABLE Players
(
ID UNIQUEIDENTIFIER NOT NULL PRIMARY KEY,
FirstName NVARCHAR(32),
LastName NVARCHAR(32)
);

CREATE TABLE Sessions
(
ID INTEGER NOT NULL IDENTITY,
PlayerID UNIQUEIDENTIFIER ,
SessionDateTime DATETIME,
CONSTRAINT pkSessions PRIMARY KEY (ID),
CONSTRAINT fkPlayerID FOREIGN KEY (PlayerID) REFERENCES Players(ID)
);

CREATE TABLE SessionDetail
(
SessionID INTEGER,
Time real,
Power real,
CONSTRAINT pkSessionDetail PRIMARY KEY (SessionID,StrokeTime),
CONSTRAINT fkSessionID FOREIGN KEY (SessionID) REFERENCES Sessions(ID)
);



The Players table will merge fine as GUIDs are used. However, how will the
sync capabilities of compact SQL handle the sessions table? When it pushes
the local data to the remote database will it change the Sessions.ID column
to a unique field (as no doubt lots of people will have 1, 2, 3 in their
local databases and the global database must have a unique ID), and then
transfer this changed ID back to the local database? Furthermore, if it
changes the Sessions.ID column during the merge it will also need to update
the SessionDetail.SessionID foreign key to maintain referential integrity,
is this also handled?

So my question is, how much of this sync and data merge is automated and are
there any good examples or pointers for my scenario? I cannot reasonably use
a GUID for Session.ID as there will be lots of SessionDetail entries and the
size would be far too much.

Many thanks,

Chris

View 7 Replies View Related

Possibility In Enterprise Manager

Jun 15, 2004

Hi,

I'm using enterprise manager to remotely connect to a MS SQL Server for one of my client's websites. The problem I'm having is that the connection times out when I try to expand the "Databases" folder. The reason that it's timing out is because the company that hosts the DB has hundreds of other clients who all share the same IP, but each with their own seperate login/password/database, but even though I don't have access to all the rest of the DBs on the server, it still wants to list them all for me. What I'm wondering is is there a way to set EM to ignore all of the databases on the server that cannot be accessed with my credentials? So basically when I expand the Databases folder all that appears is the one that I can access?

Thanks,
Dante

View 1 Replies View Related

SQL Express SP2 Upgrade Possibility

Sep 4, 2007

I am planning to create an application in SQL Express Advanced SP2, and later upgrading to Standard Edition. The Express SP2 Readme states somewhat unclearly that this might not be possible, that upgrading must be done prior to installing SP2, and then SP2 can be applied. I'm confused about my options.

Right now, I need to use Express Advanced for the reporting capabilities, etc., but the only available download I can find is Express Advanced SP2. If I install and use this, will I later be able to upgrade "seamlessly" to Standard Edition? Or should I install an earlier version of Express Advanced? Also, I haven't seen a lot of advice about the "seamless" upgrade from Express to other editions. If any help can be provided to answer the first question and/or point me toward upgrade documentation, it would be appreciated.

View 3 Replies View Related

Any Possibility Of Creating A MUTUALLY Dependent CHECK

Jul 20, 2005

Hi,DDL:-- create table #task (taskID int identity(1,1) primary key, taskNamevarchar(25) unique, taskCompleteDate dateTime, taskComplete bitdefault(0));/*Business Rules:a) if taskCompleteDate is NULL (like default) then, taskComplete maynot be set to 1 (attempt to update it to 1 would fail);b) else automatically set taskComplete = 1*/I was thinking using CHECK constraint (mutual constraint if possible),along the following line:CHECK (if taskCompleteDate is null set taskComplete=0 else settaskComplete=1)Hmm, your thought?Thanks.

View 5 Replies View Related

Checking User && Expire Of Update Possibility (by Trigger), How To?

Apr 16, 2007

Hi,



I have Table (RatesTable) every user can insert records to this table, and all users can see this records, this table contain the following columns:



RateID, Service, Rate, DateTime, User



Want I want is a code (trigger) in the database can do the following:



If user perform an Update request the code will check:



- if this recored inserted by the same user update command will be execute.



- if this recored inserted by other user: update command will not execute and return message.



- if more than 5 minutes passed the update command will not be execute and return message.

View 6 Replies View Related

DB Engine :: Is There Any Possibility To Override Database Audit Specification File

Nov 10, 2015

Is there any possibility to override database audit specification file. suppose i want to change some logs forcefully . is it possible ?

View 5 Replies View Related

Report Builder Report Possibility?

Feb 12, 2007

This may not be possible, but I wanted to see what some of the experts' opinions are here.

One of our users has created a report in Report Builder. I want to take this report, post it to a folder and allow her employees to run the report.

I've put it in a folder called "Reference Line Reports" and gave browser permission to a list of users. These users are able to run the report (without having access to Report Builder or the report model).

When they try to utilize the "infinite clickthrough" functionality, I get the following error.

The permissions granted to user '<domain><username>' are insufficient for performing this operation. (rsAccessDenied)





If I give one of these users access to the "report builder" they no longer get the error. The problem is that we don't want them to run the report builder (giving unrestricted access). I just want to be able to give them a report builder report with the clickthrough ability.

I would like to disclaim that we have not upgraded to SP1 (or CTP SP2 yet). Has anyone seen a similar problem or know if this was something fixed in sp1?

Thank you,


Dan

View 7 Replies View Related

Writing Directly To A Csv From Asp.net Vb Behind

Jun 16, 2004

i have a query and i would like to write the contents of the dataset out directly to a file and not bother with creating another temp table and then exporting it with a command with a dts to a csv file.

it is a type of reporting that i am trying to do
but i just need to export the raw data i retreive from the query

View 3 Replies View Related

Backup Of .MDF Directly To Tape?

Nov 28, 2007

Hello!

Me and my collegues was recently assigned to maintain a SQL Server 2000 instance, which pretty much only holds one database.
From what we can tell, a backup of this database has never been created, atleast not through SQL Server.
When asking the previous owner, the answer was "We have been taking 'Legato backups' every day!"

We now intend to schedule a SQL Server backup job, but out of curiosity...
In case of a disaster, would these "Legato backups" have been any use at all?
Please elaborate :-)

View 5 Replies View Related

Trigger A Delivery Directly

Aug 24, 2007

I have a delivery extension that prints to network printers.
Now I add a subscription like a few minutes in the future via web service for each report to print.

Is there a way I can trigger the delivery directly?

Thanks for ideas, guys.

Michael

View 3 Replies View Related

Get A Report Directly From Excel

Dec 6, 2007



Hi,

Is possible to get a report directly from excel or I must develop an tools for that?

Fredo

View 4 Replies View Related

Accessing Data Directly From A SqlDataSource?

Mar 7, 2007

First let me give you a little back ground on me.  I'm very new to the ASP, ASP.NET, Visual Studio, Sql Server, Frameworks....thing.  I am coming over from a PHP/MySql background of over 5 years.  The change over to VBScript and VB has been to tough and I have a basic liking for the Visual Studio 2005 and the ease of putting things together.  However, I have come across something that to me seems like it should be relatively simple, but haven't been able to find the documentation or samples to describe what I'm looking to do.
Rough Need:
1.  Start with a form will a couple labels and a singe textbox to get the lookup date from an user.
2.  Query one table/view based on the users choice of date and select only one field of returned data.(Doing this by itself is not a problem and I can display my results in a Gridview, but this is where it starts getting tricky and the gridviews won't work for me.)
3.  If there is something returned, I need to start a HTML table layout or possibly some form of a Gridview(I don't see how I would use the Gridview) and start a loop, adding the first returned row from this query into the first cell.
4.  Now, based on that same User Date and the returned row value from the previous query, I need to query another Table/view and return another single field, which might return 1 or multiple rows, which I need to start a loop to display unique items in cells under the first on above.
5.  Based on the original User Date and each returned row from the first query, I need to query two other Table/views and get some additional information.  4-5 fields will be returned and be displayed on one row in the number of necessary columns.
6.  This would finish the first row from the first query, so I would need to loop back up to see if there were any further results and continue looping until the get to the last of the results from the first query.
7.  Finally, I would just need to close up the Table/gridview.
The basic results I'm looking for would be similar to the following:
Results for 10/11/2005



Field name 1
Field name 2
Field name 3
Field name 4
Field name 5



First Result from query 11 of 4 results from Query 2, but only 1 unique result

Info from Query 3

Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3.
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3

Info from Query 3   
 
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4



Second Result from query 1First result from Query 2 after looping though the first query Second result from Query 2 after looping though the first query

Info from Query 3

Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3.
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3

Info from Query 3   
 
Info from Query 3
Info from Query 4
Info from Query 4

Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
It seems me from what I have read and slowly figuring out, is that I should be able to directly access the DataSet returned by four SqlDataSources, one for each of the above querys and then just write my own VB to handle the necessary looping, table format and such.  I can easily add the for SqlDataSources to the page and add a Gridview for each one and get 4 separate chunks of info, but can't see a way with GridViews to intermingle the info like displayed above.
So, if it can be done with Gridviews, then I would love to see how that is done.  But, if someone could explain to me how I access the DataSets directly that I get from the 4 SqlDataSources, then that would be ok too.  I have figured enough out with VB, that I can write the code to do my looping requirements, if I can just access the information I get back.  Thanks for reading all the way through this long post.
 Jack 

View 1 Replies View Related

Writing Directly To A Database Using An SqlDataSource

Jan 31, 2008

Hey all Im trying to make a system in which users logged on can change their password. I dont want to use a grid view because that dosent give me the chance to let them put in their old password first for validation but now I need a way of takeing data out of the textbox with the new password and placeing it in to the field in a database.As I stand at the moment I have a data.dataview variable equal to an SQL Data Source with my query in it, bringing back a record from a users table with the users username, password and a field stating what type of user they are. It filters this by username which is stored as a session variable and username is the primary key. there is then an if statement checking that the string in the password field is equal to what the user has written in the old password box and if they match it uses the command:dv.Table.Rows(0)(1) = txtNewPassword.TextMsgBox("Password Successfully Changed", MsgBoxStyle.Information)When I run this the validation successfully checks the password is correct and then displays the message box saying the password is correct but it hasnt actually changed it. Somone I know told me that I need to use the command sqldatasource.update but I cant see where it fits in. Anyone got any ideas? 

View 2 Replies View Related

How To Prevent Connection To Db Directly Through ODBC

Apr 14, 2004

How to prevent connection to db directly through ODBC without using application role?


could it be done for standard user and domain user ?

Thank you

Alex

View 4 Replies View Related

Can SQL Server 2K Connect Directly To PostgreSQL?

May 22, 2001

hello everyone!

I'm currently dumping tables from PostgreSQL 7 to SQL Server 2K and I've been wondering if it's possible to create a trigger between the two databases.
..like if there's an insert to a PostgreSQL table, the trigger inserts the same row to the SQL Server table.

If it is possible, please do send me a sample code.

Thanks!

View 1 Replies View Related

Inputing Data Directly Into A Table

Feb 19, 2004

hi
im new to Sql server so this might be a daft question

is there something where i can put data directly into a table (i.e entering data into a grid) or do i have to write the sql every time

View 3 Replies View Related

Query Replica Directly Via SSMS?

Apr 3, 2015

I know it is possible to use the secondary replica to pull data (application intent) etc..

But is there some way to query the replica directly via SSMS?

View 2 Replies View Related

Connecting Directly To SQL Server Oer The Internet

May 14, 2008

Hi,
I'm currently writing a desktop application that communicates directly with a SQL server database on the local network. Ideally we'd like to connect directly to the database via the Internet.
- connecting via the Internet is important because we want easy access from anywhere.
- directly is important because fast data transfer is a requirement.

Not knowing much about the security implications of such a connection, I thought I'd ask here. So what are the major risks and objections? Can the connection and data be made secure?

Cheers, Gavin

View 2 Replies View Related

How To Get Info In SELECT Directly Instead Of UPDATE? Thanks.

Jul 23, 2005

Greetings!I have the 3 raw data tables below, and would like to extract somedata. My current query is really cumbersome, does anyone know a betterway to get all the info (attach the right state to the lowest zip code)in one step? Thanks a lot! Here are the details.- Ideal Output, for each person , keep(1) person_id (From Table A)(2) The earliest open_date of accounts starting with 2 (From Table A)(3) ssn (From Table B)(4) Zip and state info (From Table C), but only keep the lowest zip andstate.-Table A -person_idaccountopen_date10001220000015/15/200310001220000026/20/200410001300000012/2/200210002220000038/12/200410002220000049/15/200410002300000022/16/2005-Table B -person_idzip state1000111111AA1000122222CC1000233333BB--Table C -person_idssn100011234567100022345678-Ideal Output-person_idmin_openssnzipstate100015/15/2003123456711111AA100028/12/2004234567833333BBHere is what I did:Select a.person_id, min(a.open_date), b.ssn, min(c.zip) as zip,cast (0 as varchar) as stateInto output[color=blue]>From TableA as a[/color]Join TableB as bon a.person_id=b.person_idJoin TableC as con a.person_id=c.person_idWhere a.account like '2%'Group by a.person_id, b.ssnOrder by a.person_idUpdate outputSet output.state=b.state[color=blue]>From output as a[/color]Join TableC as bon a.person_id=b.person_idand a.zip=b.zip

View 2 Replies View Related

Read Backup File Directly?

Jun 20, 2007

Is there a way to read a backup file to see if it contains a file withoutrestoring the backup file? We are missing a record from a table, and I needto find out when it was deleted. We have nightly backup files of thedatabase. Is it possible, knowing the database name, the table name, and theprimary key value of the record, to determine if the record exists in acertain backup file? If not, is there an alternate way to determine when aparticular record was deleted?Thank you!Neil

View 2 Replies View Related

How Can I Use Regular Expressions In WHERE Clause Directly?

Oct 30, 2006

How can I use regular expressions in WHERE clause directly?

select * from mytbl where myfld like '[0-9]*key'

View 3 Replies View Related

Installing SP2 Directly Over SQL Server 2005 Without Sp1

Dec 27, 2006

Hello,

1. Can we directly install sp2 without SP1 - for sql server 2005.

2 . Iam basically dotnet developer. iam using sql server 2005 both developer and express editions. Do i need to stop sql server service before installing sp2. ?

During sp1 installation, it seems some file are locked and when it prompt, i stopped service and continued installation.

3. Moreover Sql server 2005 express edition comes along with VS2005 didn't have management studio. I feel like having entire features installed in my system. I have downloaded express edition SQLEXPR_ADV.exe. Which is better choice for installation.

thanks

karthik







View 3 Replies View Related

How To Display Report In Pdf Format Directly

May 5, 2008



Hi all
I am using local reports.(.rdlc files)
My requirement is when the user selects some options in the form and click on Submit buttion,He should get report in PDF format directly.Is it possible?if possible give me some example code.No need to preview in general format.
Help me.
Regards.

View 3 Replies View Related

HOW TO: Print A Report Directly To A Printer

Oct 18, 2006

The code below is a class file done in vb.net. The original idea came from reading this forum and some blogs.



To use the code below, you can create a windows application or service.

then create a class file and drop this code in it.

Remeber to reference the 2005 report execution service and also in the program settings include the path to your server.

IE: ReportExecutionService = http://localhost/ReportServer/ReportExecution2005.asmx or whatever your server URL is at.

Setup the public properties for printername (sharenames work fine), Number of copies and Report name.

That is all there is to it. This code is REALLY expandable to add more options.

Please remember to let me kow if you like this.

Imports System

Imports System.Drawing

Imports System.Drawing.Imaging

Imports System.Drawing.Printing

Imports System.IO

Imports System.Web.Services.Protocols

Imports PrintReport.ReportExecution

Imports System.Runtime.InteropServices ' For Marshal.Copy

Namespace PrintReport

Friend Class app

Private m_sPrinterName As String

Private m_sReportName As String

Private m_sNumCopies As Integer

<STAThread()> _

Public Sub Main(ByVal args As String())

Dim pe As PrintMain = New PrintMain()

pe.PrintReport(m_sPrinterName, m_sReportName, m_sNumCopies)

End Sub

Public Property pPrinterName()

Get

Return m_sPrinterName

End Get

Set(ByVal value)

m_sPrinterName = value

End Set

End Property

Public Property pReportName()

Get

Return m_sReportName

End Get

Set(ByVal value)

m_sReportName = value

End Set

End Property

Public Property pNumCopies()

Get

Return m_sNumCopies

End Get

Set(ByVal value)

m_sNumCopies = value

End Set

End Property

End Class

Friend Class PrintMain

Private rs As New ReportExecutionService()

Private m_renderedReport As Byte()()

Private m_delegate As Graphics.EnumerateMetafileProc = Nothing

Private m_currentPageStream As MemoryStream

Private m_metafile As Metafile = Nothing

Private m_numberOfPages As Integer

Private m_currentPrintingPage As Integer

Private m_lastPrintingPage As Integer

Public Sub New()

' Create proxy object and authenticate

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

rs.Url = My.Settings.ReportExecutionService '"http://localhost/ReportServer/ReportExecution2005.asmx"

End Sub

Public Function RenderReport(ByVal reportPath As String) As Byte()()

' Private variables for rendering

Dim deviceInfo As String

Dim format As String = "IMAGE"

Dim firstPage As Byte() = Nothing

Dim encoding As String = ""

Dim mimeType As String = ""

Dim warnings As Warning() = Nothing

Dim reportHistoryParameters As ParameterValue() = Nothing

Dim streamIDs As String() = Nothing

Dim pages As Byte()() = Nothing

Dim historyID As String = Nothing

Dim showHideToggle As String = Nothing

Dim execInfo As New ExecutionInfo

Dim execHeader As New ExecutionHeader()

Dim SessionId As String

Dim extension As String = ""

rs.ExecutionHeaderValue = execHeader

execInfo = rs.LoadReport(reportPath, historyID)

'rs.SetExecutionParameters(parameters, "en-us")

SessionId = rs.ExecutionHeaderValue.ExecutionID

' Build device info based on the start page

deviceInfo = String.Format("<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>", "emf")

'Exectute the report and get page count.

Try

' Renders the first page of the report and returns streamIDs for

' subsequent pages

firstPage = rs.Render(format, deviceInfo, extension, encoding, mimeType, warnings, streamIDs)

' The total number of pages of the report is 1 + the streamIDs

m_numberOfPages = streamIDs.Length + 1

pages = New Byte(m_numberOfPages - 1)() {}

' The first page was already rendered

pages(0) = firstPage

Dim pageIndex As Integer = 1

Do While pageIndex < m_numberOfPages

' Build device info based on start page

deviceInfo = String.Format("<DeviceInfo><OutputFormat>{0}</OutputFormat><StartPage>{1}</StartPage></DeviceInfo>", "emf", pageIndex + 1)

pages(pageIndex) = rs.Render(format, deviceInfo, extension, encoding, mimeType, warnings, streamIDs)

pageIndex += 1

Loop

Catch ex As SoapException

'Console.WriteLine(ex.Detail.InnerXml)

Catch ex As Exception

'Console.WriteLine(ex.Message)

Finally

'Console.WriteLine("Number of pages: {0}", pages.Length)

End Try

Return pages

End Function

Public Function PrintReport(ByVal printerName As String, ByVal ReportName As String, Optional ByVal NumCopies As Integer = 0) As Boolean

Me.RenderedReport = Me.RenderReport(ReportName)

Try

' Wait for the report to completely render.

If m_numberOfPages < 1 Then

Return False

End If

Dim printerSettings As PrinterSettings = New PrinterSettings()

printerSettings.MaximumPage = m_numberOfPages

printerSettings.MinimumPage = 1

printerSettings.PrintRange = PrintRange.SomePages

printerSettings.FromPage = 1

printerSettings.ToPage = m_numberOfPages

printerSettings.Copies = NumCopies

printerSettings.PrinterName = printerName

Dim pd As PrintDocument = New PrintDocument()

m_currentPrintingPage = 1

m_lastPrintingPage = m_numberOfPages

pd.PrinterSettings = printerSettings

' Print report

'Console.WriteLine("Printing report...")

AddHandler pd.PrintPage, AddressOf pd_PrintPage

pd.Print()

Catch ex As Exception

'Console.WriteLine(ex.Message)

Finally

' Clean up goes here.

End Try

Return True

End Function

Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)

ev.HasMorePages = False

If m_currentPrintingPage <= m_lastPrintingPage AndAlso MoveToPage(m_currentPrintingPage) Then

' Draw the page

ReportDrawPage(ev.Graphics)

' If the next page is less than or equal to the last page,

' print another page.

If m_currentPrintingPage <= m_lastPrintingPage Then

m_currentPrintingPage += 1

ev.HasMorePages = True

End If

End If

End Sub

' Method to draw the current emf memory stream

Private Sub ReportDrawPage(ByVal g As Graphics)

If Nothing Is m_currentPageStream OrElse 0 = m_currentPageStream.Length OrElse Nothing Is m_metafile Then

Return

End If

SyncLock Me

' Set the metafile delegate.

Dim width As Integer = m_metafile.Width

Dim height As Integer = m_metafile.Height

m_delegate = New Graphics.EnumerateMetafileProc(AddressOf MetafileCallback)

' Draw in the rectangle

Dim destPoint As Point = New Point(0, 0)

g.EnumerateMetafile(m_metafile, destPoint, m_delegate)

' Clean up

m_delegate = Nothing

End SyncLock

End Sub

Private Function MoveToPage(ByVal page As Int32) As Boolean

' Check to make sure that the current page exists in

' the array list

If Nothing Is Me.RenderedReport(m_currentPrintingPage - 1) Then

Return False

End If

' Set current page stream equal to the rendered page

m_currentPageStream = New MemoryStream(Me.RenderedReport(m_currentPrintingPage - 1))

' Set its postion to start.

m_currentPageStream.Position = 0

' Initialize the metafile

If Not Nothing Is m_metafile Then

m_metafile.Dispose()

m_metafile = Nothing

End If

' Load the metafile image for this page

m_metafile = New Metafile(CType(m_currentPageStream, Stream))

Return True

End Function

Private Function MetafileCallback(ByVal recordType As EmfPlusRecordType, ByVal flags As Integer, ByVal dataSize As Integer, ByVal data As IntPtr, ByVal callbackData As PlayRecordCallback) As Boolean

Dim dataArray As Byte() = Nothing

' Dance around unmanaged code.

If data <> IntPtr.Zero Then

' Copy the unmanaged record to a managed byte buffer

' that can be used by PlayRecord.

dataArray = New Byte(dataSize - 1) {}

Marshal.Copy(data, dataArray, 0, dataSize)

End If

' play the record.

m_metafile.PlayRecord(recordType, flags, dataSize, dataArray)

Return True

End Function

Public Property RenderedReport() As Byte()()

Get

Return m_renderedReport

End Get

Set(ByVal value As Byte()())

m_renderedReport = value

End Set

End Property



End Class

end namespace









View 27 Replies View Related

Printing Report Directly Without Using Reportviewer

Apr 11, 2008



Hi,

My Requirement is to dirctly Print the SSRS Report without using Reportviewer.
If anybody know How to Print Report without using Reportviewer, please let me know asap.

Thanks in advance.

View 2 Replies View Related

Is It Possilbe To Load My Data Directly?

Oct 3, 2006

I have thousands of records, which are .txt format, to be loaded to the DB and need to mining them. The only way for that is to write a program and read them to the DB or can I load them directly? And also I have to design the tables based on these data myself, right? Thank you.

View 6 Replies View Related

Different Result Running SQL Query Directly Or Using SqlCommand

Sep 11, 2006

Hi, when running the following stored procedure: ALTER PROCEDURE [dbo].[GetWerknemersBijLeidinggevende]@LeidinggevendeID int,@Start int = 1,@Limit int = 25,@Sofinummer int = NULL,@Achternaam nvarchar(128) = NULL,@Functie nvarchar(64) = NULL
ASWITH Ordered AS
(
SELECT
ROW_NUMBER() OVER (ORDER BY Achternaam) AS RowNumber,Persoon.*FROM PersoonINNER JOIN DienstverbandON Persoon.ID = Dienstverband.PersoonIDINNER JOIN BedrijfsonderdeelON Bedrijfsonderdeel.ID = Dienstverband.BedrijfsonderdeelIDINNER JOIN LeidinggevendeON Bedrijfsonderdeel.ID = Leidinggevende.BedrijfsonderdeelIDWHERE
Leidinggevende.Begindatum <= getdate()AND (Leidinggevende.Einddatum > getdate()OR Leidinggevende.Einddatum IS NULL
)
AND Leidinggevende.PersoonID = @LeidinggevendeIDAND
(
Sofinummer = @Sofinummer
OR @Sofinummer IS NULL
)
AND
(
Achternaam LIKE @AchternaamOR AchternaamPartner LIKE @AchternaamOR @Achternaam IS NULL
)
)
SELECT *FROM OrderedWHERE RowNumber between @Start and (@Start + @Limit - 1)  When I run this in the database and fille de LeidinggevendeID parameter with a value I get a few rows returned, however when I run the following code: [DataObject(true)] public class PersoonFactory { [DataObjectMethod(DataObjectMethodType.Select, false)] public static IList WerknemersBijLeidinggevende(int ldgID, int start, int max) { IList list = new List(); SqlDataReader rdr = null; SqlConnection connection = DatabaseProvider.Connection; SqlCommand command = new SqlCommand("GetWerknemersBijLeidinggevende", connection); command.Parameters.AddWithValue("LeidinggevendeID", ldgID); command.CommandType = CommandType.StoredProcedure; try
{
connection.Open();
rdr = command.ExecuteReader(CommandBehavior.CloseConnection);
while (rdr.Read()) { Persoon pers = new Persoon(); pers.ID = rdr["ID"] as int?; pers.Achternaam = rdr["Achternaam"] as string; pers.AchternaamPartner = rdr["AchternaamPartner"] as string; pers.Achtertitels = rdr["Achtertitels"] as string; pers.DatumOverlijden = rdr["DatumOverlijden"] as DateTime?; pers.Geboortedatum = rdr["Geboortedatum"] as DateTime?; pers.Geslacht = rdr["Geslacht"] as string; pers.Middentitels = rdr["Middentitels"] as string; pers.Naamgebruik = (int)rdr["Naamgebruik"]; pers.Sofinummer = rdr["Sofinummer"] as string; pers.Voorletters = rdr["Voorletters"] as string; pers.Voortitels = rdr["Voortitels"] as string; pers.Voorvoegsel = rdr["Voorvoegsel"] as string; pers.VoorvoegselPartner = rdr["VoorvoegselPartner"] as string; list.Add(pers); } } catch
{
throw; } finally
{
if (rdr != null) rdr.Close(); else connection.Close(); } return list; }  I get 0 rows all of a sudden. Any idea why? 

View 7 Replies View Related

How Can I Directly Include A Square Root In A SQL Query

Dec 17, 2006

I have an ASP.NET application where I need to filter the records returned from a SQL query using a calculated distance to a point that is set by the user.   To do this directly, I would need to include a square root of an expression in the SQL query.  It seems like I should be able to do this by writing my SQL query something like:
SELECT SQRT(expression ....) AS distance, column2, column3 ... FROM mytable WHERE distance < 50
Unfortunately, SQL queries apparently don't like the SQRT function.  I am using .NET 2.0 with VS2005 and a MS Access backend (that will soon be moved to SQL/Server).
As an alternate, maybe I can query the data into a temporary record set with a extra field for distance and then step my way through the temporary record set and replace the values in the distance field with a calculated distance.  Once the temporary record set is prepared, then I would delete the records that don't pass the distance requirement or otherwise hide them and bind the data to a gridview control.
Thanks,
David

View 10 Replies View Related







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