|
Hello !
I'm starting to create a project with Vb.net 2010 and SQl server 2008r2.I don't know what to choose dataset or Entity framework ?
Another question :Are these both compatible with crystal reports ?
Thank you.
|
|
|
|
|
The two choices are not interchangable. You also haven't explained what you're app is going to be doing at all so it's impossible to say.
You're asking "Should I use these two bolts to build my project (DataSet)? Or use everything in this machine shop supply store (Entity Framework)?"
Neither of these has anything to do with Crystal Reports. CR gets its data from the database, not from the objects that make up and manage your data model.
|
|
|
|
|
i try to create a data source on vb.net and there are 2 options : Dataset or Entity Data model ?
So how to decide which is the best choice ?
Someone can describe some avantages and disavantages on both model ?
What i'm going to do ? Usual things that someone can do with database :
Read , Write , Modify , Display , bound controls .... Sometimes with few records (50-10) , sometimes with much more (300-500)....
I read that if i choose one model i should continue with that , and can't use both models.
So what can i do ?
Thank you.
|
|
|
|
|
The "What are you going to do", was more a brief the application would be for.......
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
this application would be for a school managment (student personal data , results, financial data...
|
|
|
|
|
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.
|
|
|
|