Group:  Microsoft Access ยป microsoft.public.access.adp.sqlserver
Thread: Newly Created tables

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Newly Created tables
Barbara Musante 23.02.2006 20:23:27
I have a situation where I need to create a new table in the current sql
database in my access project and then use the contents of the table in other
parts of the project. It seems that the project cannot see the new table
unless I disconnect and re-connect the ADO connection. Is there another way
to do this?

thanks
--
Barbara Musante
Partner
Re: Newly Created tables
"Tom Ellison" <tellison[ at ]jcdoyle.com> 24.02.2006 10:12:59
Dear Barbara:

Your experience does not match mine. I am able to use a table immediately
after creating it, provided it is in a database to which I am connected.

Could you please share the detaila of how you are creating this table, how
you are subsequently addressing the table, and what specific error it is
generating? Perhaps someone will then see what is wrong.

Tom Ellison


"Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
news:03CD30D6-7985-4C9C-8899-EEE17A95D34B[ at ]microsoft.com...
[Quoted Text]
>I have a situation where I need to create a new table in the current sql
> database in my access project and then use the contents of the table in
> other
> parts of the project. It seems that the project cannot see the new table
> unless I disconnect and re-connect the ADO connection. Is there another
> way
> to do this?
>
> thanks
> --
> Barbara Musante
> Partner


Re: Newly Created tables
"Tom Ellison" <tellison[ at ]jcdoyle.com> 24.02.2006 10:32:05
for "detaila" please read "details"

Tom


"Tom Ellison" <tellison[ at ]jcdoyle.com> wrote in message
news:%23LOLjrSOGHA.3276[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> Dear Barbara:
>
> Your experience does not match mine. I am able to use a table immediately
> after creating it, provided it is in a database to which I am connected.
>
> Could you please share the detaila of how you are creating this table, how
> you are subsequently addressing the table, and what specific error it is
> generating? Perhaps someone will then see what is wrong.
>
> Tom Ellison
>
>
> "Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
> news:03CD30D6-7985-4C9C-8899-EEE17A95D34B[ at ]microsoft.com...
>>I have a situation where I need to create a new table in the current sql
>> database in my access project and then use the contents of the table in
>> other
>> parts of the project. It seems that the project cannot see the new table
>> unless I disconnect and re-connect the ADO connection. Is there another
>> way
>> to do this?
>>
>> thanks
>> --
>> Barbara Musante
>> Partner
>
>


Re: Newly Created tables
Barbara Musante 24.02.2006 18:33:26
Hi Tom,

Thanks for the response. The way I create and use the table is this. I
first execute a stored procedure that creates the table using a select
......into tblstorestatus. After that I attempted to do a docmd.transfertext
on this table to create a text file of the information. Unless I do a
application.currentproject.closeconnection followed by a
application.currentproject.openconnection, the transfertext operation gets an
error that it cannot find the object.

I hope that this explains the situation and also hope that you can help.
--
Barbara Musante
Partner


"Tom Ellison" wrote:

[Quoted Text]
> Dear Barbara:
>
> Your experience does not match mine. I am able to use a table immediately
> after creating it, provided it is in a database to which I am connected.
>
> Could you please share the detaila of how you are creating this table, how
> you are subsequently addressing the table, and what specific error it is
> generating? Perhaps someone will then see what is wrong.
>
> Tom Ellison
>
>
> "Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
> news:03CD30D6-7985-4C9C-8899-EEE17A95D34B[ at ]microsoft.com...
> >I have a situation where I need to create a new table in the current sql
> > database in my access project and then use the contents of the table in
> > other
> > parts of the project. It seems that the project cannot see the new table
> > unless I disconnect and re-connect the ADO connection. Is there another
> > way
> > to do this?
> >
> > thanks
> > --
> > Barbara Musante
> > Partner
>
>
>
Re: Newly Created tables
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)> 24.02.2006 19:49:47
Maybe making a call to Application.RefreshDatabaseWindow will solve this.
There is also the possibility of a timing problem: if you make the call from
ADP too fast after the creation of the new table, you won't still see it
because SQL-Server didn't have the time to finalize the operation; so you
may have to introduce a short delay between these two operations.

See the post from Ron Hinds on
http://groups.google.ca/group/microsoft.public.access.adp.sqlserver/browse_frm/thread/4e723da0f9add729/938eac123effb43c?q=RefreshDatabaseWindow&rnum=3#938eac123effb43c
to see how to call the Sleep() function from ADP (however, I don't know if
this will work for you).

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


"Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
news:F01148EE-0231-492D-B778-F159B918FEAE[ at ]microsoft.com...
[Quoted Text]
> Hi Tom,
>
> Thanks for the response. The way I create and use the table is this. I
> first execute a stored procedure that creates the table using a select
> .....into tblstorestatus. After that I attempted to do a
> docmd.transfertext
> on this table to create a text file of the information. Unless I do a
> application.currentproject.closeconnection followed by a
> application.currentproject.openconnection, the transfertext operation gets
> an
> error that it cannot find the object.
>
> I hope that this explains the situation and also hope that you can help.
> --
> Barbara Musante
> Partner
>
>
> "Tom Ellison" wrote:
>
>> Dear Barbara:
>>
>> Your experience does not match mine. I am able to use a table
>> immediately
>> after creating it, provided it is in a database to which I am connected.
>>
>> Could you please share the detaila of how you are creating this table,
>> how
>> you are subsequently addressing the table, and what specific error it is
>> generating? Perhaps someone will then see what is wrong.
>>
>> Tom Ellison
>>
>>
>> "Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
>> news:03CD30D6-7985-4C9C-8899-EEE17A95D34B[ at ]microsoft.com...
>> >I have a situation where I need to create a new table in the current sql
>> > database in my access project and then use the contents of the table in
>> > other
>> > parts of the project. It seems that the project cannot see the new
>> > table
>> > unless I disconnect and re-connect the ADO connection. Is there
>> > another
>> > way
>> > to do this?
>> >
>> > thanks
>> > --
>> > Barbara Musante
>> > Partner
>>
>>
>>


Re: Newly Created tables
Barbara Musante 24.02.2006 20:15:27
Thank you for the suggestion. I think that this will work. I am assuming
that you can use the refresh command even in an .ade.

Thanks again.
--
Barbara Musante
Partner


"Sylvain Lafontaine" wrote:

[Quoted Text]
> Maybe making a call to Application.RefreshDatabaseWindow will solve this.
> There is also the possibility of a timing problem: if you make the call from
> ADP too fast after the creation of the new table, you won't still see it
> because SQL-Server didn't have the time to finalize the operation; so you
> may have to introduce a short delay between these two operations.
>
> See the post from Ron Hinds on
> http://groups.google.ca/group/microsoft.public.access.adp.sqlserver/browse_frm/thread/4e723da0f9add729/938eac123effb43c?q=RefreshDatabaseWindow&rnum=3#938eac123effb43c
> to see how to call the Sleep() function from ADP (however, I don't know if
> this will work for you).
>
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
> E-mail: http://cerbermail.com/?QugbLEWINF
>
>
> "Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
> news:F01148EE-0231-492D-B778-F159B918FEAE[ at ]microsoft.com...
> > Hi Tom,
> >
> > Thanks for the response. The way I create and use the table is this. I
> > first execute a stored procedure that creates the table using a select
> > .....into tblstorestatus. After that I attempted to do a
> > docmd.transfertext
> > on this table to create a text file of the information. Unless I do a
> > application.currentproject.closeconnection followed by a
> > application.currentproject.openconnection, the transfertext operation gets
> > an
> > error that it cannot find the object.
> >
> > I hope that this explains the situation and also hope that you can help.
> > --
> > Barbara Musante
> > Partner
> >
> >
> > "Tom Ellison" wrote:
> >
> >> Dear Barbara:
> >>
> >> Your experience does not match mine. I am able to use a table
> >> immediately
> >> after creating it, provided it is in a database to which I am connected.
> >>
> >> Could you please share the detaila of how you are creating this table,
> >> how
> >> you are subsequently addressing the table, and what specific error it is
> >> generating? Perhaps someone will then see what is wrong.
> >>
> >> Tom Ellison
> >>
> >>
> >> "Barbara Musante" <bmusante[ at ]sierraview.com> wrote in message
> >> news:03CD30D6-7985-4C9C-8899-EEE17A95D34B[ at ]microsoft.com...
> >> >I have a situation where I need to create a new table in the current sql
> >> > database in my access project and then use the contents of the table in
> >> > other
> >> > parts of the project. It seems that the project cannot see the new
> >> > table
> >> > unless I disconnect and re-connect the ADO connection. Is there
> >> > another
> >> > way
> >> > to do this?
> >> >
> >> > thanks
> >> > --
> >> > Barbara Musante
> >> > Partner
> >>
> >>
> >>
>
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net