Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Friday, March 30, 2012

LINK WITH SQL SERVER

Hi, I'm doing a proyect with Visual Basic where I have to use a
database that I've already made on SQL SERVER. In my computer I had to
install WINDOWS 2000 family server, to be able to install SQL SERVER
as server not as a client, I can see perfectly and totally the
database from VB.

The problem is that now I have a laptop, and I want to continue
developing on it, I already installed everything like in the other
one, but I can't see SQL SERVER as a provider when I want to make the
connection. So I don't know if I have to do something special in order
to see it from Visual Basic.

I don't want to make a network, I just want to keep with the proyect
from the laptop.

Please somebody help me.Gloria (gloriarr2001@.yahoo.com.mx) writes:
> Hi, I'm doing a proyect with Visual Basic where I have to use a
> database that I've already made on SQL SERVER. In my computer I had to
> install WINDOWS 2000 family server, to be able to install SQL SERVER
> as server not as a client, I can see perfectly and totally the
> database from VB.
> The problem is that now I have a laptop, and I want to continue
> developing on it, I already installed everything like in the other
> one, but I can't see SQL SERVER as a provider when I want to make the
> connection. So I don't know if I have to do something special in order
> to see it from Visual Basic.

I'm not really sure what you mean with that you cannot see SQL Server as
provider. Do you run your program, and you fail to connect? Or is it
somehow missing in the developement environment? In the latter case,
you may be better off asking in a Visual Basic newsgroup.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||The fact is that when I try to make a connection from Visual Basic, I
have to specified the provider of OLE DB, so I use Microsoft OLE DB
Provider for SQL Sever, and when I try to check the connection there's
an error, there is no problem with Visual Basic, so I think that I do
something wrong with the SQL SERVER installation.

Is there anything that you suggest I can do?|||Gloria (gloriarr2001@.yahoo.com.mx) writes:
> The fact is that when I try to make a connection from Visual Basic, I
> have to specified the provider of OLE DB, so I use Microsoft OLE DB
> Provider for SQL Sever, and when I try to check the connection there's
> an error, there is no problem with Visual Basic, so I think that I do
> something wrong with the SQL SERVER installation.
> Is there anything that you suggest I can do?

Could you post the relevant piece of code?

There are a numbe of possibilities, but not having to access to your
machine, I'm in the dark.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||gloriarr2001@.yahoo.com.mx (Gloria) wrote in message news:<334b61a7.0404282149.1839acf1@.posting.google.com>...
> The fact is that when I try to make a connection from Visual Basic, I
> have to specified the provider of OLE DB, so I use Microsoft OLE DB
> Provider for SQL Sever, and when I try to check the connection there's
> an error, there is no problem with Visual Basic, so I think that I do
> something wrong with the SQL SERVER installation.
> Is there anything that you suggest I can do?

Have you installed the SQL Server client on your laptop?|||Not quite sure what you mean by "see SQL Server as a provider".

1. You need to have the SQL Server Client Tools installed on your
laptop.

2. Your laptop needs to be able to see the server in Network.

3. You need to "register" your database in the EnterpriseManager on
your laptop.

Alternatively, if you mean you can't create a UDL, the steps are:
A. In Windows Explorer, select File | New | text file.
B. Rename the resulting textfile to have .udl as its extension,
e.g. MyDatabase.udl. You will get a warning about changing the file
extension, ignore it.
C. Open the udl. Here's the stupid part -- when you open it, it
will be on the SECOND page of the wizard, which is only for ODBC
connections. You have to go to the FIRST page to find the SQL Server
OLE DB provider.
D. Now you can define your connection string like
Dim MyDB As Connection
Set MyDB = New Connection
MyDB.ConnectionString = "file name=c:\MyDatabase.udl"

HTH :)

On 28 Apr 2004 12:34:47 -0700, gloriarr2001@.yahoo.com.mx (Gloria)
wrote:

>Hi, I'm doing a proyect with Visual Basic where I have to use a
>database that I've already made on SQL SERVER. In my computer I had to
>install WINDOWS 2000 family server, to be able to install SQL SERVER
>as server not as a client, I can see perfectly and totally the
>database from VB.
>The problem is that now I have a laptop, and I want to continue
>developing on it, I already installed everything like in the other
>one, but I can't see SQL SERVER as a provider when I want to make the
>connection. So I don't know if I have to do something special in order
>to see it from Visual Basic.
>I don't want to make a network, I just want to keep with the proyect
>from the laptop.
>Please somebody help me.

LINK WITH SQL SERVER

Hi, I'm doing a proyect with Visual Basic where I have to use a
database that I've already made on SQL SERVER. In my computer I had to
install WINDOWS 2000 family server, to be able to install SQL SERVER
as server not as a client, I can see perfectly and totally the
database from VB.

The problem is that now I have a laptop, and I want to continue
developing on it, I already installed everything like in the other
one, but I can't see SQL SERVER as a provider when I want to make the
connection. So I don't know if I have to do something special in order
to see it from Visual Basic.

I don't want to make a network, I just want to keep with the proyect
from the laptop.

Please somebody help me.Gloria (gloriarr2001@.yahoo.com.mx) writes:
> Hi, I'm doing a proyect with Visual Basic where I have to use a
> database that I've already made on SQL SERVER. In my computer I had to
> install WINDOWS 2000 family server, to be able to install SQL SERVER
> as server not as a client, I can see perfectly and totally the
> database from VB.
> The problem is that now I have a laptop, and I want to continue
> developing on it, I already installed everything like in the other
> one, but I can't see SQL SERVER as a provider when I want to make the
> connection. So I don't know if I have to do something special in order
> to see it from Visual Basic.

I'm not really sure what you mean with that you cannot see SQL Server as
provider. Do you run your program, and you fail to connect? Or is it
somehow missing in the developement environment? In the latter case,
you may be better off asking in a Visual Basic newsgroup.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||The fact is that when I try to make a connection from Visual Basic, I
have to specified the provider of OLE DB, so I use Microsoft OLE DB
Provider for SQL Sever, and when I try to check the connection there's
an error, there is no problem with Visual Basic, so I think that I do
something wrong with the SQL SERVER installation.

Is there anything that you suggest I can do?|||Gloria (gloriarr2001@.yahoo.com.mx) writes:
> The fact is that when I try to make a connection from Visual Basic, I
> have to specified the provider of OLE DB, so I use Microsoft OLE DB
> Provider for SQL Sever, and when I try to check the connection there's
> an error, there is no problem with Visual Basic, so I think that I do
> something wrong with the SQL SERVER installation.
> Is there anything that you suggest I can do?

Could you post the relevant piece of code?

There are a numbe of possibilities, but not having to access to your
machine, I'm in the dark.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||gloriarr2001@.yahoo.com.mx (Gloria) wrote in message news:<334b61a7.0404282149.1839acf1@.posting.google.com>...
> The fact is that when I try to make a connection from Visual Basic, I
> have to specified the provider of OLE DB, so I use Microsoft OLE DB
> Provider for SQL Sever, and when I try to check the connection there's
> an error, there is no problem with Visual Basic, so I think that I do
> something wrong with the SQL SERVER installation.
> Is there anything that you suggest I can do?

Have you installed the SQL Server client on your laptop?|||Not quite sure what you mean by "see SQL Server as a provider".

1. You need to have the SQL Server Client Tools installed on your
laptop.

2. Your laptop needs to be able to see the server in Network.

3. You need to "register" your database in the EnterpriseManager on
your laptop.

Alternatively, if you mean you can't create a UDL, the steps are:
A. In Windows Explorer, select File | New | text file.
B. Rename the resulting textfile to have .udl as its extension,
e.g. MyDatabase.udl. You will get a warning about changing the file
extension, ignore it.
C. Open the udl. Here's the stupid part -- when you open it, it
will be on the SECOND page of the wizard, which is only for ODBC
connections. You have to go to the FIRST page to find the SQL Server
OLE DB provider.
D. Now you can define your connection string like
Dim MyDB As Connection
Set MyDB = New Connection
MyDB.ConnectionString = "file name=c:\MyDatabase.udl"

HTH :)

On 28 Apr 2004 12:34:47 -0700, gloriarr2001@.yahoo.com.mx (Gloria)
wrote:

>Hi, I'm doing a proyect with Visual Basic where I have to use a
>database that I've already made on SQL SERVER. In my computer I had to
>install WINDOWS 2000 family server, to be able to install SQL SERVER
>as server not as a client, I can see perfectly and totally the
>database from VB.
>The problem is that now I have a laptop, and I want to continue
>developing on it, I already installed everything like in the other
>one, but I can't see SQL SERVER as a provider when I want to make the
>connection. So I don't know if I have to do something special in order
>to see it from Visual Basic.
>I don't want to make a network, I just want to keep with the proyect
>from the laptop.
>Please somebody help me.|||Well, I don't want to make a network, so there's no need to install
SQL as client on my laptop, I just want to develop on it, and the
problem appears when I creat the UDL, during I try to choose the
database, and an error about the provider appears (that it can be
use).

What do you think I can do?|||>Well, I don't want to make a network, so there's no need to install
>SQL as client on my laptop, I just want to develop on it, and the
>problem appears when I creat the UDL, during I try to choose the
>database, and an error about the provider appears (that it can be
>use).
>What do you think I can do?

Tell us what the error msg is.

Randy
http://members.aol.com/rsmeiner|||Gloria (gloriarr2001@.yahoo.com.mx) writes:
> Well, I don't want to make a network, so there's no need to install
> SQL as client on my laptop, I just want to develop on it, and the
> problem appears when I creat the UDL, during I try to choose the
> database, and an error about the provider appears (that it can be
> use).

I don't understand what you mean by "make a network", but since you
gooc have good use for having Query Analyzer and friends on the
machine while developing, I suggest that you install the client
part of SQL Server. You are not making a network that way anyway.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||How do you expect to talk to the database on the other box if the
laptop isn't connected to it?

On 4 May 2004 11:37:22 -0700, gloriarr2001@.yahoo.com.mx (Gloria)
wrote:

>Well, I don't want to make a network, so there's no need to install
>SQL as client on my laptop, I just want to develop on it, and the
>problem appears when I creat the UDL, during I try to choose the
>database, and an error about the provider appears (that it can be
>use).
>What do you think I can do?|||Well, I don't want to make a network, so there's no need to install
SQL as client on my laptop, I just want to develop on it, and the
problem appears when I creat the UDL, during I try to choose the
database, and an error about the provider appears (that it can be
use).

What do you think I can do?|||>Well, I don't want to make a network, so there's no need to install
>SQL as client on my laptop, I just want to develop on it, and the
>problem appears when I creat the UDL, during I try to choose the
>database, and an error about the provider appears (that it can be
>use).
>What do you think I can do?

Tell us what the error msg is.

Randy
http://members.aol.com/rsmeiner|||Gloria (gloriarr2001@.yahoo.com.mx) writes:
> Well, I don't want to make a network, so there's no need to install
> SQL as client on my laptop, I just want to develop on it, and the
> problem appears when I creat the UDL, during I try to choose the
> database, and an error about the provider appears (that it can be
> use).

I don't understand what you mean by "make a network", but since you
gooc have good use for having Query Analyzer and friends on the
machine while developing, I suggest that you install the client
part of SQL Server. You are not making a network that way anyway.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||How do you expect to talk to the database on the other box if the
laptop isn't connected to it?

On 4 May 2004 11:37:22 -0700, gloriarr2001@.yahoo.com.mx (Gloria)
wrote:

>Well, I don't want to make a network, so there's no need to install
>SQL as client on my laptop, I just want to develop on it, and the
>problem appears when I creat the UDL, during I try to choose the
>database, and an error about the provider appears (that it can be
>use).
>What do you think I can do?|||Ellen K. <72322.enno.esspeeayem.1016@.compuserve.com> wrote in message news:<nguh90duagqp6p85vqmg6664n8babe7r8d@.4ax.com>...
> How do you expect to talk to the database on the other box if the
> laptop isn't connected to it?
Well, wath I want to do is have the database in the laptop, I already
created there, I can use the query analyzer, but in the UDL
construction, there's an error after I dropdown on the databases box.sql

Friday, March 23, 2012

Link Report Builder with Visual Studio C#

How call a method of Visual Studio after close Report Builder?

Then in this method I must obtain the path and the name of created report with Report Builder.

Thanks for help me.

This is not supported. Interesting idea, though.

Wednesday, March 21, 2012

Linefeed Issue

All,
Why does chr(13) +chr(10) create a new line feed in Visual Studio, but does
not when you render using IE with the HTML viewer?
Any ideas'
JimWhich build are you running?
Did you try using the predefined VB constant VbCrLf ?
E.g. ="First line" & VbCrLf & "second line"
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim_OLAP" <JimOLAP@.discussions.microsoft.com> wrote in message
news:0EF1FE67-E355-49B6-BB08-18C247E7E321@.microsoft.com...
> All,
> Why does chr(13) +chr(10) create a new line feed in Visual Studio, but
> does
> not when you render using IE with the HTML viewer?
> Any ideas'
> Jim
>|||Robert,
Thanks for the reply; Yes, I tried the Vb constant but I still get
inconsistent line feeds in IE. As a solution, I had to make each line the
same character length using a combination of left() and format().
Thanks,
Jim
"Robert Bruckner [MSFT]" wrote:
> Which build are you running?
> Did you try using the predefined VB constant VbCrLf ?
> E.g. ="First line" & VbCrLf & "second line"
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Jim_OLAP" <JimOLAP@.discussions.microsoft.com> wrote in message
> news:0EF1FE67-E355-49B6-BB08-18C247E7E321@.microsoft.com...
> > All,
> >
> > Why does chr(13) +chr(10) create a new line feed in Visual Studio, but
> > does
> > not when you render using IE with the HTML viewer?
> >
> > Any ideas'
> >
> > Jim
> >
>
>

Wednesday, March 7, 2012

Limited number of assemblies available in Visual Studio SQL Server Projects

Hi,

When starting a SQL Server Project in Visual Studio, there are a very limited number of assemblies available to reference. Does anyone know why?

Specifically I would like to use "Microsoft.AnalysisServices.AdomdClient". Does anyone know how I could do that?

Best Regards,

Johan ?hln,
IFS

Hi,

if you want more than these one, you have to register them in the GAC to see them in VS. The ones listed were intensivly tested by Microsoft not to produce any memory leaks being threadsafe etc. Additional (custom) resources have to be listed first for the computer and marked with the security policy level they need. "Doing the stack walk" while registering them at deployment time, SQL Server makes sure that called ressources reflect the at most the security settings of the registered assembly.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Hi Jens,

Thanks for your answer.

Microsoft.AnalysisServices.AdomdClient is already registered in the GAC, but I don't see it in Visual Studio. What else do I have to do to be able to reference it?

From what I can see it has unrestricted permissions in .NET Runtime Security Policy.

Best Regards,

Johan ?hln

|||

Hi Johan,

As the previous person mentions, the assemblies that are available to references in a sql server project are restricted. I think what this person meant to say is that these system assemblies are loaded from the GAC by sql server, yet this has nothing to do with when you wish to use an unsupported system assembly.

Note here about my terminology, system assembly = .Net BCL, user assembly = custom assembly.

You are wishing to reference an unsupported system assembly in sql server, this can be attempted (I say this because depending upon what the individual assembly tries to do, even in unsafe it will not be allowed to run when called upon and it's corresponding app. domain will be unloaded).

To do this, first run a create assembly statement referencing the adomd client assembly. Second, create a new regular class library project and add your reference to the adomd client libary. Then build the class in VS. Next, run the create assembly statement for your newly created class.

*You may have to set lower permission sets on the adomd client depending upon its attributes etc. There is a concept known as Host Protection Attributes (HPAs) which help sql server in determing which managed libaries should be allowed to execute within the hosted clr context. Basically, you may have to set the adomd client to unsafe it is "threatening" enough. But again, even with unsafe, sql server will only allow so much to occur aka you cannot kill sqlservr.exe from sqlclr code.

Hope this helps,

Derek

|||

Two additional points:

1. Actually, VS has a nice feature where if the assembly you're looking for is already registered in your SQL Server database, then you can reference it directly from your VS Database Project, even if it is a custom assembly or one that is not on the supported system assemblies list. It should show up normally under "Add Reference".

2. There are extremely few things that do not work in unsafe permission set, and the restrictions that are in place weren't done with reliability in mind. There are a number of ways to effectively kill your SQL Server process when running under unsafe, if you wanted to.

Steven

|||Noted on the unsafe being able to kill sqlservr. I did find that HPAs are only used in safe and unsafe perm buckets.|||i meant safe and external access :)|||

Thank you for your answers.

It seems impossible to reference AdomdClient from a SQL Server assembly:

It cannot be added using CreateAssembly|||

Johan ?hln wrote:

It seems impossible to reference AdomdClient from a SQL Server assembly:

It cannot be added using CreateAssembly

|||

TITLE: Microsoft SQL Server Management Studio Express

Create failed for SqlAssembly 'Microsoft.AnalysisServices.AdomdClient'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+SqlAssembly&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

CREATE ASSEMBLY failed because type 'ShilohSchemas' in safe assembly 'Microsoft.AnalysisServices.AdomdClient' has a static field 'shilohSchemas'. Attributes of static fields in safe assemblies must be marked readonly in Visual C#, ReadOnly in Visual Basic, or initonly in Visual C++ and intermediate language.
Warning: The SQL Server client assembly 'microsoft.analysisservices.adomdclient, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment. (Microsoft SQL Server, Error: 6211)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=6211&LinkId=20476


BUTTONS:

OK

|||

I have solved this. It works if you create it as unsafe.

Thanks for your answers,

Johan

Friday, February 24, 2012

limit to the number of rows a dataset can store?

hI,

I am using visual c# 2003 and sqlserver 2000 and i am trying to query a column in the sql server and store it into a dataset but i got an error msg:

The number of rows for this query will output 90283 rows.

------------------------
Query :

SELECT L_ExtendedPrice, COUNT (*) AS Count FROM LINEITEM GROUP BY L_ExtendedPrice ORDER BY Count DESC";

------------------------
Error msg :

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

Additional information: System error.
-------------------------

is there a limit to the number of rows a dataset can store?That's a lot of rows....

Can I ask what you plan to do with them?

And it's not really a sql server question...|||hi,

It is because I am a university student and i am doing my final year project on querying and i need these data to proceed on. I am researching on Small Group Sampling.

I was thinking that i am using sql server 2000 and maybe i can post this question in here as I am really in need of help for this.

thks|||Whatever you thought you wanted to do with the "dataset", why don't you want to do it on the server? All this "C#" and stuff is good, but only when used appropriately. Having a front-end with 90K+ rows is not a good idea, unless it's a report. But if that's the case, - it shouldn't be going into a "dataset."|||Originally posted by sunspot
hi,

It is because I am a university student and i am doing my final year project on querying and i need these data to proceed on. I am researching on Small Group Sampling.

I was thinking that i am using sql server 2000 and maybe i can post this question in here as I am really in need of help for this.

thks

OK, I'll byte...what's your major going to be in....|||Hi,

It is because I need to use the data in thwe dataset to do something else. This question is actually related to a question I posted on :

visual studio.net and sql server 02-12-04 22:01

I do not know what is the wrong things that I have done and that is why I am asking how many rows a dataset can store as I got error msg when I run the program.