Sample ADP files? URGENT

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi all,

i've recently (as of yesterday) hit a brick wall and had to learn the
staggering difference between jet and transact-sql, and also ADO. I need
urgent assistance to get this database up and running for work (due
yesterday!!!) If anyone has a URL to point to me to show how i need to
recode my project to talk to sql that would be great.

My current specific problem - before (using mdb) i simply had forms bound to
tables. Now (using ADO) i need to insert a black record, then set my forms
recordsource to that record. Am having some major trouble, and if i could
see how other people do it it would be great.

Cheers,
Bill
 
B> My current specific problem - before (using mdb) i
B> simply had forms bound to tables. Now (using ADO)
B> i need to insert a black record, then set my forms
B> recordsource to that record. Am having some major
B> trouble, and if i could see how other people do it
B> it would be great.

In mdb, the code and data are under same roof, so it's easy. With sql
server, they are not. The data from the new record you created goes to the
server only when you save the record, and that's when the server is creating
new value for the identity column; before that, server is not aware that you
are going to bless it with new record;

If you need the new value already while creating the new record, you can
easily create it by yourself instead of relying on the server:

me.id = currentproject.connection.execute("select max(id)+1 from
mytable")(0)

Vadim
 
Back
Top