|
OK, If you've never used either of these, don't even think of trying the Entity Framework.
Seriously, if you don't know what each of them is, you really don't have the skill set to use either of them. I highly suggest picking up a book on ADO.NET and/or Entity Framework 4.x and work through them. If you don't, you're just going to put yourself through an awful lot of pain and make bad design decisions that will cause your project to fail.
|
|
|
|
|
thank you !
But i have create before a project using dataset.But i have read that entity framework is something new and better than dataset.And of course if entity framework is better than dataset , i will read some books before creating my project.
I want to know if possible some adavntages ( or disavantages ) of entity framework vs dataset ?
Or , if doesn't has importance what i know about both models , if a professionist have to choose : dataset or entity framework ? i like to know if possible your choice.
Thank you.
|
|
|
|
|
There is no "better". There is "appropriate".
What is appropriate for your application depends on your apps requirements, specifications and expected load. If you're doing this for a school project, I would probably suggest using the smaller dataset methods.
Serisouly, we know NOTHING of your application so you are the only one who can make this decision. But, in order to do that, YOU have to understand the capabilities and limitations, pros and cons of each. Pickup a book and start reading.
|
|
|
|
|
ok. Can you suggest a book for beginners in entity framework ?
Thank you.
|
|
|
|
|
|
I have created a VB.NET app, a small mcq based quiz. Now when i run it on a different resolution than my PC then all the items(labels,textboxes etc) on the form get scattered.
How can we create resolution independent applications?
|
|
|
|
|
Windows Forms in .NET offers a great method variety of Autosizing, Docking and Align properties that should make it easier to get the positioning right for varying resolutions. You'll need to play around with them a bit to get a feel for it.
Alternatively, if these don't offer enough power, you'll need to write your own control-positioning/sizing code in the Resize event for the form.
|
|
|
|
|
Try Anchoring or Docking[^] your controls. Remember, the Anchor and Dock properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence.
Excuse me for my improper grammar and typos.
It's because English is my primary language, not my first language.
My first languages are C# and Java.
VB, ASP, JS, PHP and SQL are my second language.
Indonesian came as my third language.
My fourth language? I'm still creating it, I'll let you know when it's done!
|
|
|
|
|
Hi guys
I am busy with a vb application that passes text to Ms Word , How does one specify where the text must be placed
eg. I have a template of a contract , I want the application to search the contract template word document and place the date at a specific place
cheers
|
|
|
|
|
I used a "search and replace" concept to do what you are describing.
1) Use something like [%0], [%1], etc to indicate that you want certain fields replaced in your text with parameters; starting with parameter zero, parameter one, two, etc
2) Now you just invoke your search and replace logic as many times as you need to "merge" the variable data with your "static" MS-Word document.
Seems to work for me.
Good luck.
|
|
|
|
|
I found this it really helped
|
|
|
|
|
shy boi wrote:
I found this it really helped
What is this? there is no link
You can use bookmarks in Word
|
|
|
|
|
Apologies code block didnt load
Imports Word = Microsoft.Office.Interop.Word
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objWordApp As New Word.Application
objWordApp.Visible = True
Dim objDoc As Word.Document = objWordApp.Documents.Open("C:\Trydata\1.doc")
objDoc = objWordApp.ActiveDocument
objDoc.Content.Find.Execute(FindText:="VB", ReplaceWith:="Visual Basic Express", Replace:=Word.WdReplace.wdReplaceAll)
While objDoc.Content.Find.Execute(FindText:=" ", Wrap:=Word.WdFindWrap.wdFindContinue)
objDoc.Content.Find.Execute(FindText:=" ", ReplaceWith:=" ", Replace:=Word.WdReplace.wdReplaceAll, Wrap:=Word.WdFindWrap.wdFindContinue)
End While
objDoc.Save()
objDoc.Close()
objDoc = Nothing
objWordApp.Quit()
objWordApp = Nothing
End Sub
End Class
|
|
|
|
|
Hi all...
I have made a program in VB.NET(VS 2008) to start a cmd.exe process using Process class.
Code is running perfectly on 32-bit Windows but when I am trying to run same code on 64-bit Windows 7 it is giving an error message that process file not found.
I compiled code for ANY CPU, x32 and x64 and tested separately on 64-bit OS but getting same error message.
Suggest me what should I do.
Thanks.
Gagan
|
|
|
|
|
Please show your code and the exact text of the error message.
|
|
|
|
|
I don't see why that was downvoted, but as mentioned above, more information is required.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I have a problem on passing value from Main Form to 2nd Form. Actually, I have a 2nd Form on the SplitContainer and the SplitContainer is placed inside the Main form.
What I want to do is Click the Button on the 2nd Form from the Button on the Main Form.
Thanks in advance.
|
|
|
|
|
If you move the code out of the button Click event handler and into it's own method, you'll have a much easier time calling that code from other classes (Forms).
|
|
|
|
|
Hi I have a font that I use, but on some PC I can't install it(no rights)
So I wrote a function to use the installed font if it exist or the ttf file
this is the code
Public Function ChessFont(ByVal Grootte As Integer, ByVal style As FontStyle) As Font
Dim f As Font = Nothing
If Settings.ChessFont <> "" Then
f = New Font(Settings.ChessFont, Grootte, style)
End If
If (f.Name.ToUpper <> Settings.ChessFont.ToUpper) Then
If Settings.ChessFontFile <> "" Then
Dim pfc As New Drawing.Text.PrivateFontCollection
pfc.AddFontFile(Settings.ChessFontFile)
Dim ff As FontFamily = pfc.Families(0)
f = New Font(ff, Grootte, style)
'just testing
Dim frm As New Form
Dim l As New Label
l.Font = f
l.Visible = True
l.Location = New Point(0, 0)
l.Size = New Size(200, 200)
l.BackColor = Color.Yellow
l.Text = "kqrbhp lwtnjo"' these symbols I use
frm.Controls.Add(l)
frm.ShowDialog()
'and works fine
End If
End If
Return f
End Function
On the test form I have the correct result but is U use the font
like
Dim F as Font = ChessFont(16,Bold)
e.graphics.drawstring("Test",F,black,0,0)
it is not working. I have times new roman as font
Can someone point me to what i'm doing wrong?
|
|
|
|
|
If you're packaging the font in your app, why are you even bothering with switching between two fonts?? Just use your privately held font all the time so you get a consistent look acrossed all installations.
|
|
|
|
|
I was thinking about to do that to, but for now an installed font works fine and the ttf works in the test form but not afterwoths.
So once it works always when I'm using the ttf-file I gonna use that method always.
However I can not install a font at the office, but I can at home.
|
|
|
|
|
The logic in your posted code doesn't make much sense. I suggest rewriting it to seperate functionality.
The biggest problem I see is that your logic missed cases, like Settings.ChessFont being an invalid font name, or if Settings.ChessFont is empty (use String.Empty instead of "") or null, you go into a second If statement unneccessarily. The comparison you're making in this second If also doesn't amke sense and is completely unneccessary.
If should be if the Settings.ChessFont is empty, or is an invalid name, default to a known font family name.
The first thing I would do is move the code that loads the font family name from settings to its own method. This method would have to load the setting from wherever, then VERIFY that the family name exists in the available fonts, both system and/or in the private collection, then return that name.
|
|
|
|
|
hi experts,
I have rdlc report in asp.net which has two datasource and it added in report data sources list as 'ds_WKSG' and 'ds_WKBC'.
The problem is it only works when I use either one of them. If I will add the second datasource onto my report it gives an error
'A data source instance has not been supplied for the data source ds_WKBC'.
I googled it already but my case is different.
i read already here.. [^]my case is I want to use to datasource in one report.
thanks in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
hi everybody,
I have a table whith a lot an invoice (2007, 2008, 2009 etc)and I want to group the invoice by years (2007, 2008 etc). A client may have many invoice every year.
I try something but I didn't find a solution to SUM value of invoice for all years separately:
SELECT SUM(total_sales) AS year_1, Client
FROM vanzari_totale
GROUP BY DATEPART(
Database is MS Access.
Please is urgent.
Thanks in advance!
|
|
|
|
|
sorin_zan wrote: Please is urgent.
It's only urgent to you. To a bunch of people who volunteer their time for free, it really doesn't matter.
You have to specify one or more column names in the GROUP BY clause, not actual data.
|
|
|
|