|
You have to load the child objects in your query:
Myob1list = (From t in context.ob1s.Include("chld")
Select t).ToList()
(I'm converting C# code from memory. I haven't touched VB.NET in a few years now.)
|
|
|
|
|
Sorry , but I'm using lazyloading.
and I've read that these proxy objects , are related with using of lazyloading.
So , why all other actions that I do with my objects works without problems, and this Clone action produce errors ?
|
|
|
|
|
dilkonika wrote: Sorry , but I'm using lazyloading.
and I've read that these proxy objects , are related with using of lazyloading.
Yeah, I can see that.
dilkonika wrote: So , why all other actions that I do with my objects works without problems, and this Clone action produce errors ?
Because the proxy classes are dynamically generated by EF and are not serializable.
|
|
|
|
|
dilkonika wrote: Sorry , but I'm using lazyloading. That doesn't mean you can't tell EF it should eager-load dependencies when you need it (which is what Include(..) does).
|
|
|
|
|
yes , but when I call the extension , these objects are already loaded in the way that I have described.
|
|
|
|
|
Hello I've managed to get the current tab for Google Chrome however how do I change that URL and made a navigation? I've done on IE but no luck for Opera and Firefox.
Example: Current urL: google.com will be yahoo.com upon active tab taken. Do I need to play something with the process of chrome? Thank you for any solution to be provide.
Dim procsChrome As Process() = Process.GetProcessesByName("chrome")
02
For Each chrome As Process In procsChrome
03
04
If chrome.MainWindowHandle = IntPtr.Zero Then Continue For
05
Dim elm As AutomationElement = AutomationElement.FromHandle(chrome.MainWindowHandle)
06
Dim elmUrlBar As AutomationElement = elm.FindFirst(TreeScope.Descendants, New PropertyCondition(AutomationElement.NameProperty, "Address and search bar"))
07
If elmUrlBar IsNot Nothing Then
08
Dim patterns As AutomationPattern() = elmUrlBar.GetSupportedPatterns()
09
If patterns.Length > 0 Then
10
Dim val As ValuePattern = DirectCast(elmUrlBar.GetCurrentPattern(patterns(0)), ValuePattern)
11
If Not elmUrlBar.GetCurrentPropertyValue(AutomationElement.HasKeyboardFocusProperty) Then
12
MsgBox(LCase(val.Current.Value).Trim)
13
14
15
16
End If
17
Exit For
18
End If
19
End If
20
Next
|
|
|
|
|
Hello !
In vb.net 2013 , SQL server 2008R2 :
I have an active database , and a backup database ( .bak) file.
I want to compare the structure of these databases , to know if the structure is identical , if not to have a list with differencies
Can you give me some steps , how can I do this on Vb.net ?
Thank you !
|
|
|
|
|
|
Ok , but I want to know if how to do this with code in vb.net.
|
|
|
|
|
Mika gave you a direction; he is not going to give you the code.
if you show the code you've written and need help on a particular section, someone may help.
But, you are expected to provide the code you wrote first.
|
|
|
|
|
Hi Tim,
I don't think dilkonika was asking for ready made code here. He/She asked quite a few questions in the last days and didn't show that kind of attitude; instead came up more than once with own code-attempts. Please read his/her reply again - there's a "if how" in there. I think he/she just didn't understand Mika's reply correctly or didn't pay enough attention. I assume you downvoted the reply, maybe you want to reconsider.
cheers, Sascha
|
|
|
|
|
Sascha, replied but did not vote at all.
Thanks for the reply; hadn't seen previous posts from the OP.
|
|
|
|
|
Alright
|
|
|
|
|
Sascha Lefévre wrote: I assume you downvoted the reply, maybe you want to reconsider. No, I did, and I am not reconsidering.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
That's your right. Looking at his/her past messages I think it's a misjudgement.
|
|
|
|
|
It might not be a literal question of "gimme code", but it is a recurring theme[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I see what you're getting at, Eddy. I wouldn't downvote for that but I won't deny you having a different opinion on that.
cheers, Sascha
|
|
|
|
|
Neither would I, but as stated, it is a recurring theme.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Roger
|
|
|
|
|
That's quite a large question. Personally i would read the relevant system tables from both databases to data tables of a VB program and then compare the rows I have in both data tables.
Is there some specific issue you're stuck with?
|
|
|
|
|
SQL Server allows you to query the schema of the database; Mika's first link explains that. I recently searched for open-source projects that accomplish this task and the best thing I found is this Codeproject-article: SQL Server Database Comparison Tool[^].
It appears to have some flaws because it didn't find the differences of two database-schemas I compared with it, but it contains all kinds of SQL-queries to query the database-schema which you could use as a starting point for your own solution.
|
|
|
|
|
Sorry friends. You wrote a lot's of replies here .
But I'm not asking for someone to write my code.
I need only some steps , with words , not with code.
thank you !
|
|
|
|
|
|
dilkonika wrote: I need only some steps , with words , not with code. Then I must have misread. Looked to me like a post that contained the steps got the answer "how to do this with code in vb.net."
Get some sleep and try again tomorrow. If any of the steps are too vague, simply ask for more explanation.
FWIW, I'd start by Googleing for the SQL-command to use to restore a backup. After that, probably executing that as a NonQuery. Then, Googeling for "sys.objects", or how to get a list of all objects in Sql Server. If you Google hard enough you'll even find a copy of a poster that contains all the relations between those system tables
Then I'd be making a list of all the objects in DB A, and probably store it in a new database (DB C). Then I'd be making a list of all the objects in DB B, and store that result as a table too. Then all that is left is comparing those two lists, and displaying the difference. I'd probably do that by trying to JOIN those lists, displaying the result in a datagridview.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
sorry , but in my opinion you should not respond with " Googleing".
If all the things are clear in google , then why you keep open this forum ?
|
|
|
|