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

Friday, March 30, 2012

problem with SQL-Server 2005 CTP

I have received visual studio 2005 beta experience kit. My kit included a version of MS SQL-Server 2005 Developer Edition CTP ( Developer Edition printed on the surface of my DVD but I don't know it's true or not ? Idea because I saw this page: http://www.microsoft.com/sql/2005/productinfo/sql2005features.mspx and there was not Developer Edition). I had a new and fresh Windows 2003 (without SP1) installed on one of my office PCs. So I decided to install visual studio 2005 beta 2 first and then SQL-Server 2005 CTP. But after I installed SQL-Server 2005 CTP I saw nothing in my start menu even Express Manager. My question is : how can I find SQL-Server Express Manager or Management Studio . is my problem related to installing Visual Studio 2005 Before SQL-Server like this topic: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=17309

If it is how can I fix this problem?


Excuse me for my bad English writing!

thank you!

You should try posting this question to SQL Server Setup & Upgrade forum.

Thanks,
-Vineet Rao

Problem with SQLServer 2000

i installed the Visual Studio 2004+ Framework.NET 2

and SQLserver 2005

after those

i installed SQLserver 2000

and i got this :

http://img240.imageshack.us/img240/7392/sql2fk.jpg

thank you

This is the wrong forum. From your screenshot it looks like you should be checking the Express forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=385&SiteID=1

In the meantime, have you checked in the Services panel that SQL Server is running?

Have you enabled remote conenctions using the Surface Area configuraiton tool?

-Jamie

|||what should i change here?

http://img86.imageshack.us/img86/746/remote6np.jpg

thank you|||

From the screenshot http://img240.imageshack.us/img240/7392/sql2fk.jpg - it looks like you are trying to access SQL Server 2005 Express Edition from SQL Server Enterprise Manager.

Try accessing SQL Server 2005 express edition from SQL Server Management Studio (which is equivalent of SQL Server 2000 Enterprise manager for SQL Server 2005.)

Thanks,
Loonysan

|||i dont know what do u mean...

i even dont need SQL server 2005 i need only the 2000...

but i have heard that removing SQL server 2005 from my computer wont work...

can someone give me step by step what to do to solve the problem...

thank you :D|||

deViance wrote:

i dont know what do u mean...
i even dont need SQL server 2005 i need only the 2000...
but i have heard that removing SQL server 2005 from my computer wont work...
can someone give me step by step what to do to solve the problem...

thank you :D

For a starter, you are in the wrong place.

If you don't need SQL2005 why did you install it? What exactly are you trying to do?

-Jamie

Wednesday, March 28, 2012

Problem with SQL Server and odbc, please help me!

I have Visual Studio Dot.Net on Win XP and use the MSDE to access to Sql
Server.
This morning I've attempt to create a new ODBC DSN for Sql Server so
I've executed the wizard for a new System DSN by the ODBC administrator
of Windows. But when it attempts to connect to the server (the third
step of wizard) it give me somewhat like:
Connection impossible.
SQLState: '01000'
SQL Server error: 10049
SQLState: '08001'
SQL Server error: 17
I've tried to go forward with the manual configuration (uncheck the item
"Connect to an SQL Server for the default settings.." and press the Next
button), but at the end, when I press "Verify the data source", I have
no connection. So I've canceled the wizard.
The problem is that after that moment I have no connection with the server.
The console of MSDE indicate that the server is normally running, but I
can't connect to it neither by the Server Explorer of VS nor by osql.
I have always a message like:
[DBNETLIB][ConnectionOpen(Connect()).]Server non found or access denied.
Can someone help me?
Thanks
Tonio Tanzi
P.s. the messages of the server are probably a little different by the
ones indicate by me because I've translated them from the italian version.Tonio,
Is this a development server? If so try stopping the SQL Server service and
restarting it.
HTH
Jerry
"Tonio Tanzi" <vi.tan.gr@.inwind.it> wrote in message
news:m8c%e.3633$EZ.98724@.twister1.libero.it...
>I have Visual Studio Dot.Net on Win XP and use the MSDE to access to Sql
>Server.
> This morning I've attempt to create a new ODBC DSN for Sql Server so I've
> executed the wizard for a new System DSN by the ODBC administrator of
> Windows. But when it attempts to connect to the server (the third step of
> wizard) it give me somewhat like:
> Connection impossible.
> SQLState: '01000'
> SQL Server error: 10049
> SQLState: '08001'
> SQL Server error: 17
> I've tried to go forward with the manual configuration (uncheck the item
> "Connect to an SQL Server for the default settings.." and press the Next
> button), but at the end, when I press "Verify the data source", I have no
> connection. So I've canceled the wizard.
> The problem is that after that moment I have no connection with the
> server.
> The console of MSDE indicate that the server is normally running, but I
> can't connect to it neither by the Server Explorer of VS nor by osql.
> I have always a message like:
> [DBNETLIB][ConnectionOpen(Connect()).]Server non found or access denied.
>
> Can someone help me?
> Thanks
> Tonio Tanzi
> P.s. the messages of the server are probably a little different by the
> ones indicate by me because I've translated them from the italian version.|||Jerry Spivey ha scritto:
> Tonio,
> Is this a development server? If so try stopping the SQL Server service a
nd
> restarting it.
Yes. I've just stopped and restarted both Sql Server and computer many
times widhout any result.
Other suggest?
Bye
Tonio Tanzi

Monday, March 26, 2012

Problem with SQL 2005 install. Can Microsoft.SqlServer.MSMQTask.dll be recovered?

Hello!
I am trying to install SQL Server 2005 (Developer Edition -- the version
that came with my Visual Studio 2005 Professional Edition software).
For the most part, the install went pretty smoothly. However, during the
Integration Services portion, I got the following error:
Failed to install and configure assemblies C:\Program Files\Microsoft SQL
Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.d ll in the COM+ catalog.
Error: -2146233087
Error message: Unknown error 0x80131501
Error description: You must have administrative credentials to perform this
task. Contact your system administrator for assistance.
I Googled for some solutions, and came up with a few relevant hits:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311934&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1143461&SiteID=1
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61570
I tried the suggestions therein, but none of them seemed to solve the
problem (and now I no longer have *any* Microsoft.SqlServer.MSMQTask entry
in my COM+ list). I couldn't hit "Retry" during the SQL installation and
have it gracefully resume.
I eventually just hit Ignore, and the rest of the install proceeded just
fine.
I'm wondering if there's any way to recover this file and/or COM+ entry?
I'm guessing that it's necessary for Integration Services?
(BTW: I'm on Windows XP Professional, SP2, and I had SQL Server 2005 CTP
installed at one point, too, but uninstalled before installing the current
version.)
Thanks for any help anyone can provide!
John Peterson
Hi
"John Peterson" wrote:

> Hello!
> I am trying to install SQL Server 2005 (Developer Edition -- the version
> that came with my Visual Studio 2005 Professional Edition software).
> For the most part, the install went pretty smoothly. However, during the
> Integration Services portion, I got the following error:
> Failed to install and configure assemblies C:\Program Files\Microsoft SQL
> Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.d ll in the COM+ catalog.
> Error: -2146233087
> Error message: Unknown error 0x80131501
> Error description: You must have administrative credentials to perform this
> task. Contact your system administrator for assistance.
> I Googled for some solutions, and came up with a few relevant hits:
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311934&SiteID=1
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1143461&SiteID=1
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61570
> I tried the suggestions therein, but none of them seemed to solve the
> problem (and now I no longer have *any* Microsoft.SqlServer.MSMQTask entry
> in my COM+ list). I couldn't hit "Retry" during the SQL installation and
> have it gracefully resume.
> I eventually just hit Ignore, and the rest of the install proceeded just
> fine.
> I'm wondering if there's any way to recover this file and/or COM+ entry?
> I'm guessing that it's necessary for Integration Services?
> (BTW: I'm on Windows XP Professional, SP2, and I had SQL Server 2005 CTP
> installed at one point, too, but uninstalled before installing the current
> version.)
> Thanks for any help anyone can provide!
> John Peterson
Have you tried a re-install
http://msdn2.microsoft.com/en-us/library/ms144259.aspx#reinstallmode
John
|||John,
Thanks for the reply! I've got two questions:
If I re-install, will it correctly detect the components to re-install, even
if I've already upgraded to SP2 (and the critical update for SP2)?
What exactly is Integration Services in SQL 2005? Is that sort of like the
DTS replacement? If so, is the absence of this COM+ object going to be a
hindrance?
Kind regards,
John Peterson
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:EB989A7F-2DD9-4A7C-BBB4-ECF7AD1568C4@.microsoft.com...
> Hi
> "John Peterson" wrote:
>
> Have you tried a re-install
> http://msdn2.microsoft.com/en-us/library/ms144259.aspx#reinstallmode
> John
|||Oh -- I also meant to ask whether I could expect the previous error to "go
away" if I were to try and re-install, or if it would likely pop up again?
Now that I've done a little more research on Integration Services (also
known as SSIS), it looks like it is a DTS replacement (and more). As such,
I know that I'll need to be using this component -- so if I can resolve this
installation error, I'll be a happy camper. :-)
Thanks for any additional help you (or any others) can provide!
John Peterson
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:%23unJK%234fHHA.1216@.TK2MSFTNGP03.phx.gbl...
> John,
> Thanks for the reply! I've got two questions:
> If I re-install, will it correctly detect the components to re-install,
> even if I've already upgraded to SP2 (and the critical update for SP2)?
> What exactly is Integration Services in SQL 2005? Is that sort of like
> the DTS replacement? If so, is the absence of this COM+ object going to
> be a hindrance?
> Kind regards,
> John Peterson
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:EB989A7F-2DD9-4A7C-BBB4-ECF7AD1568C4@.microsoft.com...
>

Problem with SQL 2005 install. Can Microsoft.SqlServer.MSMQTask.dll be recovered?

Hello!
I am trying to install SQL Server 2005 (Developer Edition -- the version
that came with my Visual Studio 2005 Professional Edition software).
For the most part, the install went pretty smoothly. However, during the
Integration Services portion, I got the following error:
Failed to install and configure assemblies C:\Program Files\Microsoft SQL
Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.dll in the COM+ catalog.
Error: -2146233087
Error message: Unknown error 0x80131501
Error description: You must have administrative credentials to perform this
task. Contact your system administrator for assistance.
I Googled for some solutions, and came up with a few relevant hits:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311934&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1143461&SiteID=1
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61570
I tried the suggestions therein, but none of them seemed to solve the
problem (and now I no longer have *any* Microsoft.SqlServer.MSMQTask entry
in my COM+ list). I couldn't hit "Retry" during the SQL installation and
have it gracefully resume.
I eventually just hit Ignore, and the rest of the install proceeded just
fine.
I'm wondering if there's any way to recover this file and/or COM+ entry?
I'm guessing that it's necessary for Integration Services?
(BTW: I'm on Windows XP Professional, SP2, and I had SQL Server 2005 CTP
installed at one point, too, but uninstalled before installing the current
version.)
Thanks for any help anyone can provide!
John PetersonHi
"John Peterson" wrote:
> Hello!
> I am trying to install SQL Server 2005 (Developer Edition -- the version
> that came with my Visual Studio 2005 Professional Edition software).
> For the most part, the install went pretty smoothly. However, during the
> Integration Services portion, I got the following error:
> Failed to install and configure assemblies C:\Program Files\Microsoft SQL
> Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.dll in the COM+ catalog.
> Error: -2146233087
> Error message: Unknown error 0x80131501
> Error description: You must have administrative credentials to perform this
> task. Contact your system administrator for assistance.
> I Googled for some solutions, and came up with a few relevant hits:
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311934&SiteID=1
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1143461&SiteID=1
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61570
> I tried the suggestions therein, but none of them seemed to solve the
> problem (and now I no longer have *any* Microsoft.SqlServer.MSMQTask entry
> in my COM+ list). I couldn't hit "Retry" during the SQL installation and
> have it gracefully resume.
> I eventually just hit Ignore, and the rest of the install proceeded just
> fine.
> I'm wondering if there's any way to recover this file and/or COM+ entry?
> I'm guessing that it's necessary for Integration Services?
> (BTW: I'm on Windows XP Professional, SP2, and I had SQL Server 2005 CTP
> installed at one point, too, but uninstalled before installing the current
> version.)
> Thanks for any help anyone can provide!
> John Peterson
Have you tried a re-install
http://msdn2.microsoft.com/en-us/library/ms144259.aspx#reinstallmode
John|||John,
Thanks for the reply! I've got two questions:
If I re-install, will it correctly detect the components to re-install, even
if I've already upgraded to SP2 (and the critical update for SP2)?
What exactly is Integration Services in SQL 2005? Is that sort of like the
DTS replacement? If so, is the absence of this COM+ object going to be a
hindrance?
Kind regards,
John Peterson
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:EB989A7F-2DD9-4A7C-BBB4-ECF7AD1568C4@.microsoft.com...
> Hi
> "John Peterson" wrote:
>> Hello!
>> I am trying to install SQL Server 2005 (Developer Edition -- the version
>> that came with my Visual Studio 2005 Professional Edition software).
>> For the most part, the install went pretty smoothly. However, during the
>> Integration Services portion, I got the following error:
>> Failed to install and configure assemblies C:\Program Files\Microsoft SQL
>> Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.dll in the COM+ catalog.
>> Error: -2146233087
>> Error message: Unknown error 0x80131501
>> Error description: You must have administrative credentials to perform
>> this
>> task. Contact your system administrator for assistance.
>> I Googled for some solutions, and came up with a few relevant hits:
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311934&SiteID=1
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1143461&SiteID=1
>> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61570
>> I tried the suggestions therein, but none of them seemed to solve the
>> problem (and now I no longer have *any* Microsoft.SqlServer.MSMQTask
>> entry
>> in my COM+ list). I couldn't hit "Retry" during the SQL installation and
>> have it gracefully resume.
>> I eventually just hit Ignore, and the rest of the install proceeded just
>> fine.
>> I'm wondering if there's any way to recover this file and/or COM+ entry?
>> I'm guessing that it's necessary for Integration Services?
>> (BTW: I'm on Windows XP Professional, SP2, and I had SQL Server 2005 CTP
>> installed at one point, too, but uninstalled before installing the
>> current
>> version.)
>> Thanks for any help anyone can provide!
>> John Peterson
> Have you tried a re-install
> http://msdn2.microsoft.com/en-us/library/ms144259.aspx#reinstallmode
> John|||Oh -- I also meant to ask whether I could expect the previous error to "go
away" if I were to try and re-install, or if it would likely pop up again?
Now that I've done a little more research on Integration Services (also
known as SSIS), it looks like it is a DTS replacement (and more). As such,
I know that I'll need to be using this component -- so if I can resolve this
installation error, I'll be a happy camper. :-)
Thanks for any additional help you (or any others) can provide!
John Peterson
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:%23unJK%234fHHA.1216@.TK2MSFTNGP03.phx.gbl...
> John,
> Thanks for the reply! I've got two questions:
> If I re-install, will it correctly detect the components to re-install,
> even if I've already upgraded to SP2 (and the critical update for SP2)?
> What exactly is Integration Services in SQL 2005? Is that sort of like
> the DTS replacement? If so, is the absence of this COM+ object going to
> be a hindrance?
> Kind regards,
> John Peterson
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:EB989A7F-2DD9-4A7C-BBB4-ECF7AD1568C4@.microsoft.com...
>> Hi
>> "John Peterson" wrote:
>> Hello!
>> I am trying to install SQL Server 2005 (Developer Edition -- the version
>> that came with my Visual Studio 2005 Professional Edition software).
>> For the most part, the install went pretty smoothly. However, during
>> the
>> Integration Services portion, I got the following error:
>> Failed to install and configure assemblies C:\Program Files\Microsoft
>> SQL
>> Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.dll in the COM+
>> catalog.
>> Error: -2146233087
>> Error message: Unknown error 0x80131501
>> Error description: You must have administrative credentials to perform
>> this
>> task. Contact your system administrator for assistance.
>> I Googled for some solutions, and came up with a few relevant hits:
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311934&SiteID=1
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1143461&SiteID=1
>> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61570
>> I tried the suggestions therein, but none of them seemed to solve the
>> problem (and now I no longer have *any* Microsoft.SqlServer.MSMQTask
>> entry
>> in my COM+ list). I couldn't hit "Retry" during the SQL installation
>> and
>> have it gracefully resume.
>> I eventually just hit Ignore, and the rest of the install proceeded just
>> fine.
>> I'm wondering if there's any way to recover this file and/or COM+ entry?
>> I'm guessing that it's necessary for Integration Services?
>> (BTW: I'm on Windows XP Professional, SP2, and I had SQL Server 2005
>> CTP
>> installed at one point, too, but uninstalled before installing the
>> current
>> version.)
>> Thanks for any help anyone can provide!
>> John Peterson
>> Have you tried a re-install
>> http://msdn2.microsoft.com/en-us/library/ms144259.aspx#reinstallmode
>> John
>sql

Tuesday, March 20, 2012

problem with SELECT statement and WHERE

i am using visual web developer 2005 and SQL server 2005 with VB as the code behind

i am using the following code to retrieve data from the database and display in textboxes and it works fine

Dim tblData As New Data.DataTable()
Dim conn As New Data.SqlClient.SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;IntegratedSecurity=True;User Instance=True")
Dim Command As New Data.SqlClient.SqlCommand("SELECT * FROM Table1 ", conn)
Dim da As New Data.SqlClient.SqlDataAdapter(Command)
da.Fill(tblData)
conn.Close()
TextBox4.Text = tblData.Rows(0).Item("name").ToString()
TextBox5.Text = tblData.Rows(0).Item("age").ToString()
TextBox6.Text = tblData.Rows(0).Item("email").ToString()

now i want to display data in the text boxes that match certain criteria.i modified the code like this but it did not work

Dim tblData As New Data.DataTable()
Dim conn As New Data.SqlClient.SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;IntegratedSecurity=True;UserInstance=True")
Dim Command As New Data.SqlClient.SqlCommand("SELECT * FROM Table1 WHERE name=peter", conn)
Dim da As New Data.SqlClient.SqlDataAdapter(Command)
da.Fill(tblData)
conn.Close()
TextBox4.Text = tblData.Rows(0).Item("name").ToString()
TextBox5.Text = tblData.Rows(0).Item("age").ToString()
TextBox6.Text = tblData.Rows(0).Item("email").ToString()

it gave the result as Invalid column name 'peter'.

but if i give as SELECT * FROM Table1 WHERE id=1result is displayed correctly

but id is the primary key whereas name is not a primary key.

please help me how to display the values corresponding to the name field

i would think your "Select * from table1 where name = peter"
should be
"Select * From Table1 where name = 'peter'"

notice the single quotes on around peter as your querying a char field

HTH,
AjaxButter

|||

Try putting single quotes around peter like this 'peter'. The SQLAdapter is interrepting the string peter as a column name and not a value. The reason it works with the id is because id is most likely a numeric type value (IE: int or decimal, etc.) so single quotes are not needed.

Dapanther

|||

AjaxButter,

Beat again by my slow typing LOL

Dapanther

|||

if peter is just a substring and i want all the rows containing peter as a substring in name field what will i do

please help me

|||

If you need peter as a substring then there are the follwoing possiblities.

1. the name is "xyz peter"

For this the querry would be Select * From table1 where name like '%peter'

2. the name is "Peter xyz"

Here the querry would be like this Select * From table1 where name like 'Peter %'

3. The name could be "abc Peter xyz"

The querry would be as follows: Select * From table1 where name like '%peter%'

It all depends upon what you require. The % is a wild string search.

Please mark this as answer if the post help you.

Wednesday, March 7, 2012

Problem with Remote Connections with SQL Server 2005 Standard Edition

After applying the changes mentioned in KB 914277 to allow remote connections, while working in Visual Studio 2005, I'm now getting an error with the number 26: Error locating server/Instance specified...

Sure wish I knew what remote means in this scenario, as there is nothing "remote" about my installation. I only have 1 computer, the one i'm working on, where SQL Server and Visual Studio are installed, and no networks involved, so what is remote?

Any help would be appreciated!!

If the sql server you are trying to connect to and the app you are running are on the same physical machine then you do not need to config remote connections.

Can you check if the SQL Server is still running via the services.msc or config manager first of all.

|||

If there is a way of telling SQL Server that I don't need any remote connection, I'd be more than happy to use it.

However I don't know how to do that... therefore I got the error-message about the remote connection.

How do I tell SQL Server there is no need for a remote connection?

Thanx!!

|||Use the surface area config tool|||

And then...

Check what, click what, do what?

I've only been able to install SQL Server, with a lot of coaching from this forum, I've never used it, and have no idea what makes it or any of it's utilities tick...

I'm thankful for any advice I've been given, but I have no idea what to do with the Surface Area tool, when I get there...

|||

Hello Layne - I got your e-mail about still not being able to connect. Without more information, this will be hard for everyone to help you with. But before I give you some more pointers, you should know about a couple of things.

First, this isn't the primary mechanism for support for Microsoft products. Everyone here is happy to help out where we can, but it's a free site where Microsoft and other database folks will try and help you. We'll do what we can to help you, but there are no guarantees. Microsoft hosts these sites (again, at no cost to you) but this isn't the primary method they support their products. If you need immediate assistance you can check out several support options at http://www.microsoft.com/support.

I also think the comments in your e-mail to me about "all of us going back to India" isn't very polite. If you're asking for help (for free), you may want to be complimentary rather than derogatory. It will get you more answers faster to be polite to others.

The best place for you to look for what you're asking is:

http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx

It's on Express, but will help you with your edition as well.

|||

If the problem is just remote connection is not allowed on the remote server read and check whether the remote server is configured as in the following article http://www.kodyaz.com/content/SQLServerdoesnotallowremoteconnections.aspx but it seems that you are hitting another problem

Problem with Remote Connections with SQL Server 2005 Standard Edition

After applying the changes mentioned in KB 914277 to allow remote connections, while working in Visual Studio 2005, I'm now getting an error with the number 26: Error locating server/Instance specified...

Sure wish I knew what remote means in this scenario, as there is nothing "remote" about my installation. I only have 1 computer, the one i'm working on, where SQL Server and Visual Studio are installed, and no networks involved, so what is remote?

Any help would be appreciated!!

If the sql server you are trying to connect to and the app you are running are on the same physical machine then you do not need to config remote connections.

Can you check if the SQL Server is still running via the services.msc or config manager first of all.

|||

If there is a way of telling SQL Server that I don't need any remote connection, I'd be more than happy to use it.

However I don't know how to do that... therefore I got the error-message about the remote connection.

How do I tell SQL Server there is no need for a remote connection?

Thanx!!

|||Use the surface area config tool|||

And then...

Check what, click what, do what?

I've only been able to install SQL Server, with a lot of coaching from this forum, I've never used it, and have no idea what makes it or any of it's utilities tick...

I'm thankful for any advice I've been given, but I have no idea what to do with the Surface Area tool, when I get there...

|||

Hello Layne - I got your e-mail about still not being able to connect. Without more information, this will be hard for everyone to help you with. But before I give you some more pointers, you should know about a couple of things.

First, this isn't the primary mechanism for support for Microsoft products. Everyone here is happy to help out where we can, but it's a free site where Microsoft and other database folks will try and help you. We'll do what we can to help you, but there are no guarantees. Microsoft hosts these sites (again, at no cost to you) but this isn't the primary method they support their products. If you need immediate assistance you can check out several support options at http://www.microsoft.com/support.

I also think the comments in your e-mail to me about "all of us going back to India" isn't very polite. If you're asking for help (for free), you may want to be complimentary rather than derogatory. It will get you more answers faster to be polite to others.

The best place for you to look for what you're asking is:

http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx

It's on Express, but will help you with your edition as well.

|||

If the problem is just remote connection is not allowed on the remote server read and check whether the remote server is configured as in the following article http://www.kodyaz.com/content/SQLServerdoesnotallowremoteconnections.aspx but it seems that you are hitting another problem

Saturday, February 25, 2012

Problem with printing report directly to printer

Hello,

I am trying to get a SSRS 2005 report to print from my Visual Studio 2005 C++ application without using the ReportViewer to preview it first. What I have done is created a dll that I call into when I want to access a certain report and print it. While searching around on the internet I found an MSDN article about printing a report without previewing and it had an example in C# code. So I used that as a guide for my C++ code but I am still having problems with rendering the report properly so it can be printed. When I try to render a report using the "Image" format, my streamid string is empty but the byte array that the render routine returns is not. Here is the code I am using, what could be the problem here?

Note: m_Streams is define elsewhere as

array<String^>^ m_Streams = gcnew array<String^>(10);

void Print::Export(LocalReport^ report)

{

array<Warning^>^ Warn = gcnew array<Warning^>(10);

String^ deviceinfo =

"<DeviceInfo>" +

" <OutputFormat>EMF</OutputFormat>" +

" <PageWidth>8.5in</PageWidth>" +

" <PageHeight>11in</PageHeight>" +

" <MarginTop>0.25in</MarginTop>" +

" <MarginLeft>0.25in</MarginLeft>" +

" <MarginRight>0.25in</MarginRight>" +

" <MarginBottom>0.25in</MarginBottom>" +

"</DeviceInfo>";

String^ mimeType;

String^ enc;

String^ FileExt;

array<Byte>^ bytes;

bytes = report->Render("Image",deviceinfo, mimeType, enc, FileExt, m_Streams,Warn); // m_Streams has a length of

return; // 0 after the Render

}

void Print:: PrintPage(System:: Object^ sender, System:: Drawing:: Printing:: PrintPageEventArgs^ ev)

{

Metafile^ pageImage = gcnew Metafile(m_Streams[m_CurrentPage]);

ev->Graphics->DrawImage(pageImage, ev->PageBounds);

m_CurrentPage++;

ev->HasMorePages = (m_CurrentPage < m_Streams->Length);

return;

}

void Print:Stick out tonguerintRpt()

{

String^ printerName = "Default";

if (m_Streams->Length < 0)

return;

PrintDocument^ printDoc = gcnew PrintDocument();

if (!printDoc->PrinterSettings->IsValid) {

return;

}

printDoc->PrintPage += gcnew PrintPageEventHandler(this, &Print:: PrintPage);

printDoc->Print();

return;

}

void Print::Run()

{

LocalReport^ report = gcnew LocalReport();

DataSet^ ds = gcnew DataSet();

LoadData(ds);

report->ReportPath = "c:\\bmi\\bulrpt\\Report1.rdlc";

ReportDataSource^ RDS = gcnew ReportDataSource();

RDS->Name = "DataSet1_Subject";

RDS->Value = ds->Tables["Subject"];

report->DataSources->Add(RDS);

Export(report);

PrintRpt();

return;

}

DataTable^ Print:: LoadData(DataSet^ ds)

{

System:: String ^ConnStr = "SELECT * FROM Subject";

SqlConnection^ conn = gcnew SqlConnection("Data Source=JOE-PC\\BMIMSDESERVER; Initial Catalog=stx52013;Integrated Security = TRUE");

SqlCommand^ command = gcnew SqlCommand(ConnStr, conn);

SqlDataAdapter^ adapt = gcnew SqlDataAdapter(command);

adapt->TableMappings->Add("Table", "Subject");

conn->Open();

adapt->Fill(ds);

return ds->Tables["Subject"];

}

I had the same problem with that render method and simply looped until the byte lenth was zero and that worked. There is another example out there that used the second overload of the method that works pretty much as is. In that one you pass a call back event handler.

|||

I've tried to do

bytes = report->Render("Image",deviceinfo, &Print::CreateStream,Warn);

as well but when I compile that I get the error -

error C3374: can't take address of 'Print::CreateStream' unless creating delegate instance

What does this mean?