how to insert record using dataset?

J

jaYPee

i'm wondering how can i insert record into my sql server 2000. i have
already created a connection to my sql server 2000 using the wizard. i
added 4 sqldataadapter and 1 dataset. because i am an expert in ms
access i created this first in access and i have done this in a couple
of minutes. i have not already added the RegularLoad table and
RegularLoad Details table cause i'm wondering how to do it?

in my ms access program i have this code in regular click event

Private Sub Regular_Click()
If Regular.Value = True Then
DoCmd.RunSQL "INSERT INTO SchYrSemCourseJoin ( CourseID,
SchYrSemID ) " _
& "SELECT [RegularLoad Details].CourseID, " &
Me.SchYrSemID & " " _
& "FROM RegularLoad INNER JOIN [RegularLoad Details] " _
& "ON RegularLoad.RegularLoadID = [RegularLoad
Details].RegularLoadID " _
& "WHERE (((RegularLoad.ProgramID)= " &
Forms![Students]![ProgramID] & ") AND ((RegularLoad.Year)= " & Me.Year
& ") AND " _
& "((RegularLoad.Semester)= '" & Me.Sem & "'));"
End If
End Sub


regular is a checkbox in my subform
 
C

Cor

Hi JayPee,

If you do not use the command.parameters (which as far as I can see you do
not), there should be in my opinion not any difference. And when you
connect to your SQL server with OleDB than that should not even be a
problem. Although OleDB is not my advice to do that.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top