Click here to Skip to main content
15,900,511 members

Comments by adat7378 (Top 9 by date)

adat7378 24-Sep-13 22:20pm View    
Ping is fine. Less than a millisecond. The strange thing is, the behaviour is same even if the database is on the same machine. I have done all sort of test on the network. I thought after I opened the database it is not getting closed somewhere. Sorry I forgot to mention that it works fine first time. I have closed the database and disposed the context wherever I used it. Is there any additional step needs to be taken to dispose that context when exiting the application?
adat7378 3-Jun-13 21:34pm View    
Thanks. I got the point. Unfortunatly I am only trying to learn LinQ. Could you please show me the query?

My tables are like,

(Job)
JobID
CustomerID
JobPartID

Job -> JobPart (One to Many)
(JobPart)
JobPartID
JobID [Foreign Key – ref JobID(JobID)]
Pickup-AddressID [Foreign Key – ref Address(AddressID)]
Destination-AddressID [Foreign Key – ref Address(AddressID)]

Address is a separate table
(Address)
AddressID
HouseNo
Street
City
Etc..

I get both address IDs with the below. I want the city and the street from the address table for each addredd ID.

Thanks again.

var results =
from j in job
from jp in j.JobParts
where j.CustomerID == 1
select new { jp.PickupAddressID, jp.DestinationAddressID };

adat7378 2-Apr-13 20:03pm View    
Even if the fields contain valid data, still does not save. I forgot to mention I am using MySQL and the key is auto generated by database.
adat7378 2-Apr-13 17:16pm View    
Ok. This way it creates a empty record, therefore does not meet the validation criteria. I think I need to try to save the databindingsource.
Customer_accountBindingSource.Add(New customer_account) does not work
Customer_accountBindingSource.AddNew() does not work
adat7378 2-Apr-13 16:11pm View    
I guess I have to add

Dim ca As New customer_account
context.customer_account.Add(ca)

But I run into exception,