|
You need to write a codec.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
I am building an application that needs to compare data from 2 different ODBC sources. I need to compare certain tables, joined with other tables, with the same from the other ODBC. The table structure will be the same in both ODBC databases BUT the values will not. This is known.
I am looking for a method to best compare the data. Perhaps using DataTables, DataViews, or even XML? I am not too knowledgable about XML and the related functions.
Performance is important here, since there will be a lot to compare. However, output is also very important. I would like to show the record in the table that contains different values from the other database and also show the user the properties and values that were found to be different. How best to show this?
Really appreciate any help on this.
Thank you
John Wadleigh
Siebel Expert
|
|
|
|
|
If one of your data sources is in SQL Server, you could set the other server up as a linked server in your SQL Server. You could then run queries that compare the different entities in each database.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Unfortunately it is not. The 2 databases can be either MS SQL, Oracle, or "Anywhere" databases. I was thinking of querying both DBs to get data and store this information in either DataTables or what-not. Then somehow compare and output it all in a nice fashion.
The problem is in comparing and outputting... Not sure if there is a slick way to do this, as I am sure someone else has done this before of comparing data between two DBs.
John Wadleigh
Siebel Expert
|
|
|
|
|
You could consider using LINQ to perform Intersect and Except set operations between entities that hold data from each data source. See this article[^] for more information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi every one
i want to develop a desktop application in hindi language can ny one help me how to achieve this
thanks for ur reply in advance
|
|
|
|
|
The first step is to determine whether your target Operating System versions have Hindi support. The second step is probably to decide whether you just want Hindi output, i.e. Hindi text on the screen or do you want Hindi input, the user enters Hindi text into the application, as well. The second requires more technology than the first. Then you'll probably want to read up on some of the technologies and standard you'll need. Assuming you're using only up to date desktop Windows i.e. XP or Vista you'll probably want to take a look at UNICODE www.unicode.org and then at Microsoft's documentation for UNICODE support in the Win32 API, like DrawText, and possibly at the TSF (Text Services Framework) and at IMEs (Input Method Editors) if you want Hindi input capability.
Once you've got a handle on all this then you can do your design. Just be glad you aren't working on WinCE and trying to deal with 16 languages including Chinese and Korean.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
This is an ASP.NET question. You did the right thing when you asked the question there, please don't cross post.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks wanst sure where to put it.
|
|
|
|
|
GDMFSOB wrote: wanst sure where to put it.
So to be absolutely sure to get it wrong, you posted it in both places...
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi people,
Does anyone know how to transfer files from one computer to another (not on the same network). I understand that in VB.NET you have the FTP libraries incorporated in the back end, but I'm not entirely sure on how to use them. I've tried this but it doesn't work, yet!
Dim uri As New Uri("file://C:\Documents and Settings\mhomsey\My Documents\Visual Studio 2005\Projects\CareerOneUploader\CareerOneUploader\bin\Debug\GENERATED_XML\Careersmehrmyc20080207.xml")
Dim reader As TextReader = File.OpenText(xmlFileName)
Dim xml As String = reader.ReadToEnd()
If (uri.Scheme = uri.UriSchemeFile) Then
Dim request As FileWebRequest = FileWebRequest.Create(uri)
Dim response As FileWebRequest = request.GetResponse()
Dim reader As New StreamReader(response.GetResponse())
Dim tmp As String = reader.ReadToEnd()
response.close()
End If
The code isn't finished but I just want to be able to send a file from this computer, to another remote computer. Does anyone have the same code?
Thanks very much in advance and I appreciate your help.
Michael
|
|
|
|
|
Well, to send a file via FTP, an FTP server needs to be set up somewhere.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there i am trying to create a volume control for my mp3 player threw vb.net but seems that i can't find threw the internet i tried to check on here but i don't seem to see any can anyone help me here
Thank you
|
|
|
|
|
What do you want exactly ? A program to set the volume on your computer ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want a volume control that allows me to mute the mastervolume and control the volume without useing sndvol32.exe its threw vb.net
got any thing that will help
|
|
|
|
|
Never mind about it i created one of my own thanks anyway
|
|
|
|
|
vb.net /framework 1.1
i am printing a string in printpage-event like this:
e.graphics.drawstring(mystring, myfont, mybrush, myrectangleF, new stringformat()) most times the string is so long that it doesn't fit into myrectangleF. how can i find out how many characters of mystring have been already printed into this rectangleF?
|
|
|
|
|
I think the only way to do this, is using a monospace font
like for instance 'Courier New'. Here every character uses
the same pixel width & height, so that you can predict your
Rectangle using the stringlength.
But probably you don't want to use a monospace font?
|
|
|
|
|
no, i don't want to use monospace font.
|
|
|
|
|
What you need to do is use the Graphics object method: MeasureString() to know what the width/height is of your text.
You can specify the maximum width you want the text to extend to and the method will adjust the height accordingly.
Hope it helps!
Richard
may your code be error free.
(okay, maybe two lines.)
|
|
|
|
|
thanks richard. but i think i can't solve my problem like this.
sure, i could easily find out the height of my complete text ( i alreday did that), bit i thinks that doesn't help.
let me explain, what i want to do:
in my app i need to print data:
name & address & some other information (no problem so far)
some description (which varies in length between nothing at all to some pages (taken from a memo-column in my underlying database)
for drawing this description i use the space (as rectangleF), that is left on the page after printing the other stuff like name/address/and so on.
but if the description is longer than the space still available, i have to find out which part of the description did already fit on the page, and what part of that string is left to print on the following page/pages.
i can't figure out a possibility to come to a result with graphics.measurestring. maybe i need to strip down the text line by line, but i tried this earlier and didn't like it at all.
|
|
|
|
|
I see what your getting at now. I did some digging and found that an overload on MeasureString() will output the characters fitted, which should be just what you need!
I've create an example on how to use this feature. Originally I was going to write all of the code in a button handler but it got a little messy. I ended up writing a light wieght class called "StringGenerator" that you can customize. To try this sample, perform the following steps:
1. Create a new class called "StringGenerator" and insert the code below marked: // <<<< StringGenerator Code >>>>>>
1. create a blank form and set it to be the startup form
2. add a button with it's position set to: x=5,y=5
3. double click on the button to generate an event handler.
4. Insert the code snippet below:
'begin code snippet
Dim g As Graphics = Me.CreateGraphics()
Dim sf As StringFormat = New StringFormat()
Dim intY As Integer = 20
Dim originalText As String = "This is very boring text but I don't look at what the text says, I just look at what results the text will bring."
Dim stringG As New MyClasses.StringGenerator( _
originalText, g, Me.Font, New RectangleF(80, intY, 60, 50), sf)
stringG.DrawCurrentString()
While (stringG.HasMoreCharsToDraw)
intY += 60 'in this sample, 60 creates a 10 px padding
stringG.SetNewBounds(New RectangleF(80, intY, 60, 50))
stringG.DrawCurrentString()
End While
'cleanup
g.Dispose()
sf.Dispose()
'End code snippet
Note:This code is still very primitive but it will definitely get you started. If you step through the code, you won't see any output. Remove all the breakpoints to see the dynamically generated graphics. Let me know how it turns out!
' <<<< StringGenerator Code >>>>>>
'insert into -> EMPTY <- class file!
Namespace MyClasses
Public Class StringGenerator
Dim g As Graphics
Dim rectF As RectangleF
Dim sf As StringFormat
Dim fnt As Font
Dim chars() As Char
Dim startIndex As Int32
Dim charsFitted As Int32
Dim linesFilled As Int32
Dim strDisplayText As String
Dim strCurText As String
Dim blnHasMoreChars As Boolean
Public blnClipToNearestWord As Boolean = True
Public Sub New(ByVal text As String, ByRef graphics As Graphics, ByRef font As Font, ByRef rectStartingBounds As RectangleF, ByRef stringFormat As StringFormat)
chars = text.ToCharArray()
rectF = rectStartingBounds
strCurText = text
g = graphics
fnt = font
'set blnHasMoreChars to an initial value of true;
blnHasMoreChars = True
End Sub
Public Sub DrawCurrentString()
MeasureMyCharacters()
'you can write your own custom code here, such as
'allowing a different color input. Don't allow a
'different font because it will mess you measurements up!
g.DrawRectangle(Pens.Red, Rectangle.Round(rectF))
g.DrawString(strDisplayText, fnt, Brushes.Black, rectF, sf)
End Sub
Public Sub SetNewBounds(ByVal rectFBounds As RectangleF)
rectF = rectFBounds
End Sub
Private Sub MeasureMyCharacters()
'This method takes 'strCurText' and measures it with the
'bounds supplied. MeasureString() returns a SizeF object
'but we are only interested in the output generated by the
' 'charsFitted' variable.
g.MeasureString(strCurText, fnt, rectF.Size, sf, charsFitted, linesFilled)
'If amount of chars fitted in rectF is less than
'the number of characters remaining to fit...
If (charsFitted < strCurText.Length - 1) Then
'do we want to clip to the nearest word?
If (blnClipToNearestWord) Then
'we will now loop backwards to find the first
'occurrence of a character separation: " "
For i As Integer = charsFitted + startIndex To 0 Step -1
If chars(i) = " " Then 'is the char a space?
'reduce the amount of characters fitted
'to the first word occurrence
charsFitted = (i - startIndex) + 1
i = -1 'terminate the loop
End If
Next
End If
blnHasMoreChars = True
Else
blnHasMoreChars = False
End If
'create the display contents
strDisplayText = New String(chars, startIndex, (charsFitted))
startIndex = (charsFitted + startIndex)
'assign strCurText the chars remaining to print
strCurText = New String(chars, startIndex, (chars.Length - startIndex))
End Sub
Public Function HasMoreCharsToDraw() As Boolean
HasMoreCharsToDraw = blnHasMoreChars
End Function
End Class
End Namespace
may your code be error free.
(okay, maybe two lines.)
modified on Thursday, February 7, 2008 5:20 PM
|
|
|
|
|
sorry that i come back with an answer that late. have been off for the last days.
thanks for the string generator code (and special thanks for converting it to vb.net - i just wanted to start to do it myself, when i spotted your message modification).
i integrated it to my printing routine, and it worked great. only very little modifications where necessary to make it suit to my needs.
thanks a lot.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Glad to help. Maybe one day you'll pull me out of a fix!
If you could rent a programmer a hour and a half for a dollar and a half, how much would he charge for 10 hours?
|
|
|
|