EDM question - How insert record thru code?

EDM question - How insert record thru code?

Post by Bobby Edwa » Tue, 30 Sep 2008 02:05:02

I am using VB.NET and trying to create a BLL class to insert data into
database, using the generated entity data model. Can anyone provide me with
an example?

The old way, using the XSD dataset, was done this way....
Public Sub InsertFaq(ByVal FaqQuestion As String, ByVal FaqAnswer As
String, ByVal FaqUrl As String, ByVal FaqCategoryId As Integer)
Using db As New DsFaqTableAdapters.faqsTableAdapter
db.Insert(FaqQuestion, FaqAnswer, FaqUrl, FaqCategoryId)
End Using
End Sub


1. record number after insert/delete Oracle thru connection object

2. inserting a word document into the current word doc thru code

Hi all, i build an application that opens up a word document and prints it
to the printer if the checkbox is selected. i'd like to instead insert the
document to the end of the document that is already open or copy the form
and paste it at the end. what ever makes more sense. can anyone point me in
the right directions?

For Each ctrl In Me![sfmStateForms].Form.Controls
If TypeOf ctrl Is CheckBox And ctrl.Tag = "Mandatory" Then
If ctrl.Value = True Then
Err.Number = 0
On Error GoTo notloaded2
Set objWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set objWord = CreateObject("Word.Application")
End If
objWord.Visible = True
objWord.Documents.Open FileName:="L:\Glencoe\Forms\" &
Right(ctrl.Name, Len(ctrl.Name) - 3) & ".doc"
objWord.ActiveDocument.Close SaveChanges:=0
Set objWord = Nothing
PauseCode 'Pauses the code for 1 second to see if printouts will
come out in order
End If
End If


3. Getting VBA code to cycle thru all records

4. INSERT INTO (Multiple-record append query/Insert multiple records)

5. Insert record in one table and it inserts a record in another

6. INSERT INTO (Multiple-record append query/Insert multiple records)

7. EDM Problems updating outline codes

8. How To Insert Code With Javascript, How to insert into a div an amount of code

9. How To Insert Code With Javascript, How to insert into a div an amount of code

10. How to tab thru existing records, but not new record

11. Update existing record else insert record if no record exists

12. How to get the location of SAS code in the same SAS code thru

13. SQL / query syntax, and code about inserting records

14. Help with code to insert a variable into a table record

15. Please Help: How to get auto-generated code to return new ID of inserted record?