Showing posts with label copied. Show all posts
Showing posts with label copied. Show all posts

Monday, March 19, 2012

Extended Stored Procedure creation error

I've created an extended SP on my local machine (Win XP/ VS.Net 2003 / VC++)
.
It works fine when I tested on my local PC after I copied the created dll
file to binn directory and ran sp_addextendedproc.
I copied it to a Win 2000 Server/MS SQL's binn directory and
sp_addextendedproc completed successfully. However, it gives the following
error when I execute the stored procedure:
ODBC: Msg 0, Level 16, State 1
Cannot load the DLL "uxp_calc_sw_v1.dll", or one of the DLLs it references.
Reason: 126(The specified module could not be found.).
Is the dll rely on some other dlls? or should I use Visual C++ 6.0?I found the solution myself, I just copied the following two files to the
binn folder:
DLL Name: MSVCP70.dll
DLL Name: MSVCR70.dll
Or should I copy them to Winnt\system32?
"nick" wrote:

> I've created an extended SP on my local machine (Win XP/ VS.Net 2003 / VC+
+).
> It works fine when I tested on my local PC after I copied the created dll
> file to binn directory and ran sp_addextendedproc.
> I copied it to a Win 2000 Server/MS SQL's binn directory and
> sp_addextendedproc completed successfully. However, it gives the following
> error when I execute the stored procedure:
> ODBC: Msg 0, Level 16, State 1
> Cannot load the DLL "uxp_calc_sw_v1.dll", or one of the DLLs it references
.
> Reason: 126(The specified module could not be found.).
> Is the dll rely on some other dlls? or should I use Visual C++ 6.0?
>
>|||nick (nick@.discussions.microsoft.com) writes:
> I found the solution myself, I just copied the following two files to the
> binn folder:
> DLL Name: MSVCP70.dll
> DLL Name: MSVCR70.dll
> Or should I copy them to Winnt\system32?
There is some guidelines on this in MSDN Library. I had reason to
investigate the story about the Visual C DLL:s myself a while back. My
impressions is that the recommendation is that you should should distribute
the DLL:s with your code, and place in them together with your application.
Thus, you did put them into the right place.
If you want an answer from people who really understand this, you should
ask in a C++ newsgroup.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 7, 2012

Expression editor (sort of) bug

I've noticed in the expression editor that pasting rich text (like copied
from a web page) preserves the formatting. This makes stuff look really
screwed up in the expression editor. I noticed this copying stuff from this
newsgroup and pasting it into the expression editor.I believe the formatting goes away after you commit it. But be careful
about extra carriage returns/line feeds. They can mess up the code.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Stefan Wrobel" <StefanWrobel@.discussions.microsoft.com> wrote in message
news:8C6BE014-DC4D-400B-9CA6-CBDDFC99B16E@.microsoft.com...
> I've noticed in the expression editor that pasting rich text (like copied
> from a web page) preserves the formatting. This makes stuff look really
> screwed up in the expression editor. I noticed this copying stuff from
> this
> newsgroup and pasting it into the expression editor.

Wednesday, February 15, 2012

Exporting SQL DB files

i have a VB project utilising SQL server Express. I need to export the database files so that the user data can be copied to a laptop and made available to other users.

My problem is this, connections are remaining open to the DB files even though I close all forms that include data access. Typically, my application takes around 6 minutes before the connections are released and the files can be copied.

Is there a way of either forcing all connections to close or of exporting the DB while it has connections?

Rich

Have you tried closing the connection on closing the form

Dim instance As DbConnection

instance.CloseSorry if the syntax is wrong I'm a C++ man. Same principles though.|||

In addition to what he has said about closing connections (a question might be if your access layer is caching connections, like connection pooling) you can force everyone out by using:

alter database <dbName>
set single_user with rolback immediate

Now, you have to be really careful that you want to do this, because if this is actually a database that someone else has access to they might be in the middle of doing something and this will really harsh their database experience :)

|||

I think this is exactly what's happenning, however, I am confused by your code - VS dosn't recognise it at all!

Cheers,

Rich