Showing posts with label correctly. Show all posts
Showing posts with label correctly. Show all posts

Friday, March 30, 2012

MS SQL Srv 2000 and extended stored procedures

hi,
I have created my own dll file that I would like to use in sql 2000 as an
extended stored procedure. I have checked the dll is written correctly (I ca
n
use it in other application). The dll file is created in C# (Visual Studio
2005).
Unfortunatelly I cannot use it in sql as the extended procedure. I am
getting error: Cannot find the function <<f_name>> in the library
<<path\library.dll>>. Reason: 127(error not found).Extended procedures need to be written in C or C++ (or Delphi, so I've heard
). A language that can
create classic DLL files, not any of the modern fancy COM dlls. Also, SQL Se
rver 2000 doesn't
support hosting any type of CLR code, whether through xp or sp_OACreate, or
whether with or without
any wrappers.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
> hi,
> I have created my own dll file that I would like to use in sql 2000 as an
> extended stored procedure. I have checked the dll is written correctly (I
can
> use it in other application). The dll file is created in C# (Visual Studio
> 2005).
> Unfortunatelly I cannot use it in sql as the extended procedure. I am
> getting error: Cannot find the function <<f_name>> in the library
> <<path\library.dll>>. Reason: 127(error not found).|||Hi
This may be of interest:
"Using extended stored procedures or SP_OA stored procedures to load CLR in
SQL Server is not supported"
http://support.microsoft.com/default.aspx?scid=322884
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
> Extended procedures need to be written in C or C++ (or Delphi, so I've
> heard). A language that can create classic DLL files, not any of the
> modern fancy COM dlls. Also, SQL Server 2000 doesn't support hosting any
> type of CLR code, whether through xp or sp_OACreate, or whether with or
> without any wrappers.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
>|||so is it possible to create an extended stored procedure in Visual Studio
2005 (C++)?
"Michael Epprecht [MSFT]" wrote:

> Hi
> This may be of interest:
> "Using extended stored procedures or SP_OA stored procedures to load CLR i
n
> SQL Server is not supported"
> http://support.microsoft.com/default.aspx?scid=322884
> Regards
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> so is it possible to create an extended stored procedure in Visual Studio
> 2005 (C++)?
>
Yes, but it's much easier and safer to use SQL 2005 where you can use your
C# code inside the database.
David|||Can you show me how to do that? plz
"David Browne" wrote:

> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> Yes, but it's much easier and safer to use SQL 2005 where you can use your
> C# code inside the database.
> David
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:884D5F80-4D8F-4252-824A-2B2438330B76@.microsoft.com...
> Can you show me how to do that? plz
>
Programming SQL Server 2005 Using the .NET Framework
http://msdn.microsoft.com/sql/learn...lr/default.aspx
David

MS SQL Srv 2000 and extended stored procedures

hi,
I have created my own dll file that I would like to use in sql 2000 as an
extended stored procedure. I have checked the dll is written correctly (I can
use it in other application). The dll file is created in C# (Visual Studio
2005).
Unfortunatelly I cannot use it in sql as the extended procedure. I am
getting error: Cannot find the function <<f_name>> in the library
<<path\library.dll>>. Reason: 127(error not found).Extended procedures need to be written in C or C++ (or Delphi, so I've heard). A language that can
create classic DLL files, not any of the modern fancy COM dlls. Also, SQL Server 2000 doesn't
support hosting any type of CLR code, whether through xp or sp_OACreate, or whether with or without
any wrappers.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
> hi,
> I have created my own dll file that I would like to use in sql 2000 as an
> extended stored procedure. I have checked the dll is written correctly (I can
> use it in other application). The dll file is created in C# (Visual Studio
> 2005).
> Unfortunatelly I cannot use it in sql as the extended procedure. I am
> getting error: Cannot find the function <<f_name>> in the library
> <<path\library.dll>>. Reason: 127(error not found).|||Hi
This may be of interest:
"Using extended stored procedures or SP_OA stored procedures to load CLR in
SQL Server is not supported"
http://support.microsoft.com/default.aspx?scid=322884
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
> Extended procedures need to be written in C or C++ (or Delphi, so I've
> heard). A language that can create classic DLL files, not any of the
> modern fancy COM dlls. Also, SQL Server 2000 doesn't support hosting any
> type of CLR code, whether through xp or sp_OACreate, or whether with or
> without any wrappers.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
>> hi,
>> I have created my own dll file that I would like to use in sql 2000 as an
>> extended stored procedure. I have checked the dll is written correctly (I
>> can
>> use it in other application). The dll file is created in C# (Visual
>> Studio
>> 2005).
>> Unfortunatelly I cannot use it in sql as the extended procedure. I am
>> getting error: Cannot find the function <<f_name>> in the library
>> <<path\library.dll>>. Reason: 127(error not found).
>|||so is it possible to create an extended stored procedure in Visual Studio
2005 (C++)?
"Michael Epprecht [MSFT]" wrote:
> Hi
> This may be of interest:
> "Using extended stored procedures or SP_OA stored procedures to load CLR in
> SQL Server is not supported"
> http://support.microsoft.com/default.aspx?scid=322884
> Regards
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
> > Extended procedures need to be written in C or C++ (or Delphi, so I've
> > heard). A language that can create classic DLL files, not any of the
> > modern fancy COM dlls. Also, SQL Server 2000 doesn't support hosting any
> > type of CLR code, whether through xp or sp_OACreate, or whether with or
> > without any wrappers.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Chris" <Chris@.discussions.microsoft.com> wrote in message
> > news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
> >> hi,
> >> I have created my own dll file that I would like to use in sql 2000 as an
> >> extended stored procedure. I have checked the dll is written correctly (I
> >> can
> >> use it in other application). The dll file is created in C# (Visual
> >> Studio
> >> 2005).
> >> Unfortunatelly I cannot use it in sql as the extended procedure. I am
> >> getting error: Cannot find the function <<f_name>> in the library
> >> <<path\library.dll>>. Reason: 127(error not found).
> >
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> so is it possible to create an extended stored procedure in Visual Studio
> 2005 (C++)?
>
Yes, but it's much easier and safer to use SQL 2005 where you can use your
C# code inside the database.
David|||Can you show me how to do that? plz
"David Browne" wrote:
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> > so is it possible to create an extended stored procedure in Visual Studio
> > 2005 (C++)?
> >
> Yes, but it's much easier and safer to use SQL 2005 where you can use your
> C# code inside the database.
> David
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:884D5F80-4D8F-4252-824A-2B2438330B76@.microsoft.com...
> Can you show me how to do that? plz
>
Programming SQL Server 2005 Using the .NET Framework
http://msdn.microsoft.com/sql/learning/prog/clr/default.aspx
David

Monday, March 26, 2012

MS SQL Server for the Desktop

I have a test database that needs to be installed on a laptop running XP Pro.
If memory serves me correctly, there is a free downloadable personal edition
of SQL server that will run on a laptop. Is there such a beast? If so what
is it called and what is the link to download it from.
Thanks
It's called MSDE.
http://www.microsoft.com/downloads/d...displaylang=en
http://www.aspfaq.com/
(Reverse address to reply.)
"Armyeric" <Armyeric@.discussions.microsoft.com> wrote in message
news:D26A1A44-FF03-4D34-98D6-DFA903AE4A06@.microsoft.com...
> I have a test database that needs to be installed on a laptop running XP
Pro.
> If memory serves me correctly, there is a free downloadable personal
edition
> of SQL server that will run on a laptop. Is there such a beast? If so
what
> is it called and what is the link to download it from.
> Thanks
|||If you don't need the client tools such as Enterprise Manager and Query
Analyzer and your database is no more than 2GB in size then MSDE is what you
are looking for:
http://www.microsoft.com/sql/msde/
David Portas
SQL Server MVP
|||Or you can use the new SQL Server 2005 Express.
"Armyeric" <Armyeric@.discussions.microsoft.com> wrote in message
news:D26A1A44-FF03-4D34-98D6-DFA903AE4A06@.microsoft.com...
>I have a test database that needs to be installed on a laptop running XP
>Pro.
> If memory serves me correctly, there is a free downloadable personal
> edition
> of SQL server that will run on a laptop. Is there such a beast? If so
> what
> is it called and what is the link to download it from.
> Thanks
sql

MS SQL Server for the Desktop

I have a test database that needs to be installed on a laptop running XP Pro
.
If memory serves me correctly, there is a free downloadable personal edition
of SQL server that will run on a laptop. Is there such a beast? If so what
is it called and what is the link to download it from.
ThanksIt's called MSDE.
http://www.microsoft.com/downloads/...&displaylang=en
http://www.aspfaq.com/
(Reverse address to reply.)
"Armyeric" <Armyeric@.discussions.microsoft.com> wrote in message
news:D26A1A44-FF03-4D34-98D6-DFA903AE4A06@.microsoft.com...
> I have a test database that needs to be installed on a laptop running XP
Pro.
> If memory serves me correctly, there is a free downloadable personal
edition
> of SQL server that will run on a laptop. Is there such a beast? If so
what
> is it called and what is the link to download it from.
> Thanks|||If you don't need the client tools such as Enterprise Manager and Query
Analyzer and your database is no more than 2GB in size then MSDE is what you
are looking for:
http://www.microsoft.com/sql/msde/
David Portas
SQL Server MVP
--|||Or you can use the new SQL Server 2005 Express.
"Armyeric" <Armyeric@.discussions.microsoft.com> wrote in message
news:D26A1A44-FF03-4D34-98D6-DFA903AE4A06@.microsoft.com...
>I have a test database that needs to be installed on a laptop running XP
>Pro.
> If memory serves me correctly, there is a free downloadable personal
> edition
> of SQL server that will run on a laptop. Is there such a beast? If so
> what
> is it called and what is the link to download it from.
> Thanks

MS SQL Server for the Desktop

I have a test database that needs to be installed on a laptop running XP Pro.
If memory serves me correctly, there is a free downloadable personal edition
of SQL server that will run on a laptop. Is there such a beast? If so what
is it called and what is the link to download it from.
ThanksIt's called MSDE.
http://www.microsoft.com/downloads/details.aspx?FamilyID=413744D1-A0BC-479F-BAFA-E4B278EB9147&displaylang=en
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Armyeric" <Armyeric@.discussions.microsoft.com> wrote in message
news:D26A1A44-FF03-4D34-98D6-DFA903AE4A06@.microsoft.com...
> I have a test database that needs to be installed on a laptop running XP
Pro.
> If memory serves me correctly, there is a free downloadable personal
edition
> of SQL server that will run on a laptop. Is there such a beast? If so
what
> is it called and what is the link to download it from.
> Thanks|||If you don't need the client tools such as Enterprise Manager and Query
Analyzer and your database is no more than 2GB in size then MSDE is what you
are looking for:
http://www.microsoft.com/sql/msde/
--
David Portas
SQL Server MVP
--|||Or you can use the new SQL Server 2005 Express.
"Armyeric" <Armyeric@.discussions.microsoft.com> wrote in message
news:D26A1A44-FF03-4D34-98D6-DFA903AE4A06@.microsoft.com...
>I have a test database that needs to be installed on a laptop running XP
>Pro.
> If memory serves me correctly, there is a free downloadable personal
> edition
> of SQL server that will run on a laptop. Is there such a beast? If so
> what
> is it called and what is the link to download it from.
> Thanks

Monday, March 12, 2012

MS SQL Function return string - what am I doing wrong?

Cannot see where I am going wrong. I always get a value of 0. I know my function works correctly, so it must be the VB.

CREATE FUNCTION [dbo].[getNextProjectID] ()
RETURNS varchar(10) AS
BEGIN
''.....................
DECLARE @.vNextProjectID varchar(10)
RETURN @.vNextProjectID
END

Sub LoadNextProjectNumber()
Dim vProjectID As String
Dim cmd As New SqlClient.SqlCommand()
cmd.Connection = sqlConn
cmd.CommandText = "getNextProjectID"
cmd.Parameters.Add("@.vNextProjectID", vProjectID)
cmd.Parameters("@.vNextProjectID").Direction = ParameterDirection.ReturnValue
cmd.ExecuteScalar()
vProjectID = cmd.Parameters("@.vNextProjectID").Value
txtProjectID.Text = vProjectID
cmd.Dispose()
End Sub
Hi Jagdipa,
Are you sure that your function executes correctly? I can run your example and get back string successfully. Try to run Profiler in MS SQL to see function execution log.|||check ifthis articlehelps|||hello..
try to use :
cmd.CommandType = storedprocedure
and
cmd.ExecuteNonQuery|||Thanks guys.
All I had to do was write the following line (thanks busyweb):
cmd.commandType = storedProcedure
Dont know why I need that line when the sql is a function and not astored procedure. I have had this code work before without that line.But, as long as it works...
Jagdip

Friday, March 9, 2012

MS SQL and ASP.NET connection problem

Hi,

Im trying to set up a ASP.NET webform to a MS SQL database. Im currently databinding to a datagrid. My code seems to compile correctly, no errors, however the data does not display.

I have tried to connect to the database server using the data adapter preview and works perfectly. But once i get the webpage running nothing displays from my VB code.

Does anyone have any clue to a resolution? THANK YOU ALL!I don't know if this is the problem, but I think after setting the datagrid's datasource property to the dataset, you have to type this:
"datagrid1.bind" or maybe "datagrid1.databind" (one of them: I can't quite remember)

Hope this helps.
Wes

Wednesday, March 7, 2012

MS SQL 2005 to Sybase via Linked server

I am able to see and correctly use a 32-bit Sybase OLEDB provider in
the SSIS designer on the server, however now i want to create a linked
server from SQl 2005 64-bit to Sybase. The problem is the OLEDB
Provider is not listed among the choices available for new linked
server. Also ODBC is not listed there either which i can use as a
substitute. I am aware of the fact that 32-bit DSN are managed
seperately from 64-bit.
The only choices listed are:
MS OLEDB Provider For SQL Server
MS OLEDB Provider For Analysis Services 9.0
OLEDB Provider For MS Directory Services
SQL Native Client
MS OLEDB Simple Provider
SQLXMLOLEDB
SQLXMLOLEDB 4.0
MS OLEDB Provider For Indexing Service
Is anyone of them any useful for connecting to Sybase.
maybe you should install sybase odbc driver or oledb driver.
"faraz.khan@.asu.edu" wrote:

> I am able to see and correctly use a 32-bit Sybase OLEDB provider in
> the SSIS designer on the server, however now i want to create a linked
> server from SQl 2005 64-bit to Sybase. The problem is the OLEDB
> Provider is not listed among the choices available for new linked
> server. Also ODBC is not listed there either which i can use as a
> substitute. I am aware of the fact that 32-bit DSN are managed
> seperately from 64-bit.
> The only choices listed are:
> MS OLEDB Provider For SQL Server
> MS OLEDB Provider For Analysis Services 9.0
> OLEDB Provider For MS Directory Services
> SQL Native Client
> MS OLEDB Simple Provider
> SQLXMLOLEDB
> SQLXMLOLEDB 4.0
> MS OLEDB Provider For Indexing Service
> Is anyone of them any useful for connecting to Sybase.
>
|||

Quote:

Originally Posted by xuyuntaoskyView Post

maybe you should install sybase odbc driver or oledb driver.
"faraz.khan@.asu.edu" wrote:

> I am able to see and correctly use a 32-bit Sybase OLEDB provider in
> the SSIS designer on the server, however now i want to create a linked
> server from SQl 2005 64-bit to Sybase. The problem is the OLEDB
> Provider is not listed among the choices available for new linked
> server. Also ODBC is not listed there either which i can use as a
> substitute. I am aware of the fact that 32-bit DSN are managed
> seperately from 64-bit.
> The only choices listed are:
> MS OLEDB Provider For SQL Server
> MS OLEDB Provider For Analysis Services 9.0
> OLEDB Provider For MS Directory Services
> SQL Native Client
> MS OLEDB Simple Provider
> SQLXMLOLEDB
> SQLXMLOLEDB 4.0
> MS OLEDB Provider For Indexing Service
> Is anyone of them any useful for connecting to Sybase.
>

If you noticed faraz does have the drivers installed because they
are useable via SSIS. I have the same issue. The 12.5.2 ASE
drivers are installed on the SQL Server but are not available via
the linked server dialog. Anyone know what could be causing this?
I've added the 32 bit ODBC entry in but having no luck getting the
linked server created.

MS SQL 2005 to Sybase via Linked server

I am able to see and correctly use a 32-bit Sybase OLEDB provider in
the SSIS designer on the server, however now i want to create a linked
server from SQl 2005 64-bit to Sybase. The problem is the OLEDB
Provider is not listed among the choices available for new linked
server. Also ODBC is not listed there either which i can use as a
substitute. I am aware of the fact that 32-bit DSN are managed
seperately from 64-bit.
The only choices listed are:
MS OLEDB Provider For SQL Server
MS OLEDB Provider For Analysis Services 9.0
OLEDB Provider For MS Directory Services
SQL Native Client
MS OLEDB Simple Provider
SQLXMLOLEDB
SQLXMLOLEDB 4.0
MS OLEDB Provider For Indexing Service
Is anyone of them any useful for connecting to Sybase.maybe you should install sybase odbc driver or oledb driver.
"faraz.khan@.asu.edu" wrote:

> I am able to see and correctly use a 32-bit Sybase OLEDB provider in
> the SSIS designer on the server, however now i want to create a linked
> server from SQl 2005 64-bit to Sybase. The problem is the OLEDB
> Provider is not listed among the choices available for new linked
> server. Also ODBC is not listed there either which i can use as a
> substitute. I am aware of the fact that 32-bit DSN are managed
> seperately from 64-bit.
> The only choices listed are:
> MS OLEDB Provider For SQL Server
> MS OLEDB Provider For Analysis Services 9.0
> OLEDB Provider For MS Directory Services
> SQL Native Client
> MS OLEDB Simple Provider
> SQLXMLOLEDB
> SQLXMLOLEDB 4.0
> MS OLEDB Provider For Indexing Service
> Is anyone of them any useful for connecting to Sybase.
>|||xuyuntaosky;7217938 Wrote:[vbcol=seagreen]
> maybe you should install sybase odbc driver or oledb driver.
> "faraz.khan@.asu.edu" wrote:
>
> linked
If you noticed faraz does have the drivers installed because they
are useable via SSIS. I have the same issue. The 12.5.2 ASE
drivers are installed on the SQL Server but are not available via
the linked server dialog. Anyone know what could be causing this?
I've added the 32 bit ODBC entry in but having no luck getting the
linked server created.
Wayne Francis

Monday, February 20, 2012

MS SQL 2000 and raid controller

I heard that is said that MSQ SQL 2000 doesn't work correctly with raid (for example raid 5)
I have my application in 2 companies. The first one with not a raid controller (even though the computer has a raid controller) executes a backup when no users are online in more than 8 minuter and the file of the database backup is 3,5 GB. The memory of the computer is 2GB.
In the other company when more than 20 users work in the database with a raid controller the backup is occured in 2,6 minutes and the database backup file is more than 6 GB. The memory of this computer is 4 GB.
What is your opinion?
Is this rumor true?
Do you suggest I should apply raid 5 to the first server?
Regards,
ManolisI am not sure what the problem is you think you have identified. Do you want to explain a little more.

If the rumor is true, which I extremely doubt, thousands and thousands of organizations are in trouble. I think you have been talking to sme stuffed shirt wind bag.|||I've used many versions of Microsoft SQL (even before Microsoft bought it). I've used every version since 4.2 (1994) on RAID controllers of various kinds. The only problems I've ever had with RAID controllers have been outright hardware failures, no RAID / MSSQL software related issues.

I would be astonished if there is any problem using SQL Server (any version) with a RAID controller.

-PatP|||I can add one more to Pat's list, but it is narrowly defined. If your raid controller buffers the writes, on a system with heavy i/o, you might get a stale read error when SQL Server reads from the disk again after a write was issued, but held in buffer.

The resolution to that is to decrease the size of the write buffer.

Besides ... without utilizing RAID configurations, have you seen the size of a
petabyte disk drive? :rolleyes: