Showing posts with label exe. Show all posts
Showing posts with label exe. Show all posts

Tuesday, March 27, 2012

Creating a vb6 Custom Install for MSDE 2000

Hello,
I'm trying to add MSDE to my installation program, and so far have been
unsuccessful. Right now, I'm shelling out the setup.exe program with the
parameters I want, and the install seems to go successfully. However, then I
cannot get that instance of MSDE to start, whether by "net start
instancename" or running sqlservr.exe from the instance's directory, or
running scm.exe from the Tools\Binn directory. Can someone show me the code
they have used to install MSDE along with their apps that works? Thank you
very much in advance for your help.
hi Jason,
"JasonSCC" <JasonSCC@.discussions.microsoft.com> ha scritto nel
messaggio news:AF3F3CDE-FEA0-47E0-B04A-44DE11592A93@.microsoft.com
> Hello,
> I'm trying to add MSDE to my installation program, and so far have
> been unsuccessful. Right now, I'm shelling out the setup.exe program
> with the parameters I want, and the install seems to go successfully.
> However, then I cannot get that instance of MSDE to start, whether by
> "net start instancename" or running sqlservr.exe from the instance's
> directory, or running scm.exe from the Tools\Binn directory. Can
> someone show me the code they have used to install MSDE along with
> their apps that works? Thank you very much in advance for your help.
I install MSDE the very same way you do, but actually I never tried to start
the service my self as I always require a reboot, in order to properly
register all COM components and services registration
after rebooting, the services are available for all my needs..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||On Fri, 7 Jan 2005 06:29:03 -0800, "JasonSCC"
<JasonSCC@.discussions.microsoft.com> wrote:

>Hello,
>I'm trying to add MSDE to my installation program, and so far have been
>unsuccessful. Right now, I'm shelling out the setup.exe program with the
>parameters I want, and the install seems to go successfully. However, then I
>cannot get that instance of MSDE to start, whether by "net start
>instancename" or running sqlservr.exe from the instance's directory, or
>running scm.exe from the Tools\Binn directory. Can someone show me the code
>they have used to install MSDE along with their apps that works? Thank you
>very much in advance for your help.
Have a look at the MSDE Installer example at
http://www.mvps.org/vbvision/
HTH,
Bryan
__________________________________________________ __________
New Vision Software "When the going gets weird,"
Bryan Stafford "the weird turn pro."
alpine_don'tsendspam@.mvps.org Hunter S. Thompson -
Microsoft MVP-Visual Basic Fear and Loathing in LasVegas
sql

Monday, March 19, 2012

Creating a report on a file share from a stored procedure

Hi,
I've seen one or two postings on this, and in particular 2 approaches:
1) running rs.exe from a stored procedure in conjunction with xp_cmdshell.
I have successfully managed to create and test a stored procedure that
renders a report to a file share using this approach - but for some reason
it doesn't work when integrated into the enterprise app I need it too work
with. When the sp is initiated from the app, the report appears to be
generated successfully (according to the entries in the ExecutionLog table
in the ReportServer database), but isn't being written to file on the server
(although it did in testing). No return errors, nothing in the EventLog,
nothing, nothing, nothing. Even when rs.exe is run with the -t parameter.
Very frustrating.
2) So, if I can do this quickly, I thought I'd look at a second approach i.e
accessing the web service directly from the stored procedure via the
sp_OACreate stored procedure. From a posting I've seen from Teo Lachev, he
indicates that the object to reference is MSXML2.ServerXMLHttp, with an
example provided. However what isn't clear to me is how this can be used to
render and write the report to a file share, in a similar manner to the .rss
file I used in conjunction with point 1 above. Is this approach possible?
or can the web service only be used to create an on-demand report back to a
browser?
Anyone with some examples/tips on this?
Thanks
GregWhat user security context is used when run from the app? Try (as a test)
setting Everyone Full Control to the directory where the file is being
written.
Jeff
"Greg Clark" <gclarkmail@.yahoo.com> wrote in message
news:#9IMhzamEHA.648@.tk2msftngp13.phx.gbl...
> Hi,
> I've seen one or two postings on this, and in particular 2 approaches:
> 1) running rs.exe from a stored procedure in conjunction with xp_cmdshell.
> I have successfully managed to create and test a stored procedure that
> renders a report to a file share using this approach - but for some reason
> it doesn't work when integrated into the enterprise app I need it too work
> with. When the sp is initiated from the app, the report appears to be
> generated successfully (according to the entries in the ExecutionLog table
> in the ReportServer database), but isn't being written to file on the
server
> (although it did in testing). No return errors, nothing in the EventLog,
> nothing, nothing, nothing. Even when rs.exe is run with the -t parameter.
> Very frustrating.
> 2) So, if I can do this quickly, I thought I'd look at a second approach
i.e
> accessing the web service directly from the stored procedure via the
> sp_OACreate stored procedure. From a posting I've seen from Teo Lachev,
he
> indicates that the object to reference is MSXML2.ServerXMLHttp, with an
> example provided. However what isn't clear to me is how this can be used
to
> render and write the report to a file share, in a similar manner to the
.rss
> file I used in conjunction with point 1 above. Is this approach possible?
> or can the web service only be used to create an on-demand report back to
a
> browser?
> Anyone with some examples/tips on this?
> Thanks
> Greg
>|||Hi Jeff,
The directory already has Everyone Full Control applied.
What I find so bizarre is that in theory there should be absolutely no
difference as to whether the stored procedure is called from the app
(doesn't create the file) or whether I initiate the stored procedure with a
test in SQL Query Analyzer (creates the file). The rss file createing and
rendering the report is called from within the sp, and the same credentials
are being used irrespective of how it is initiated.
I'm working in a test environment on vmware, and I have the app (which uses
sql server) installed on the same server as reporting services, and the only
clue I have is that in the TimeDataRetrieval field in the ExecutionLog
table, the value is 1000 times higher (e.g. 61315 vs 53) when the stored
procedure is initiated from the app as opposed to query analyzer. As the
Status field holds the value of rsSuccess, perhaps some timeout on the
stream.write() function is occuring' Not sure, which is why I thought I'd
try another approach..
My rss file is as follows:
Public Sub Main()
Dim format as string = "PDF"
Dim fileName as String = "C:\Reportd\yyyy.pdf"
Dim reportPath as String = "/CNSOfficeSystem/Quote"
' Prepare Render arguments
Dim historyID as string = Nothing
Dim deviceInfo as string = Nothing
Dim showHide as string = Nothing
Dim results() as Byte
Dim encoding as string
Dim mimeType as string
Dim warnings() AS Warning = Nothing
Dim reportHistoryParameters() As ParameterValue = Nothing
Dim streamIDs() as string = Nothing
' Report Parameters
Dim parameters(2) As ParameterValue
parameters(0) = New ParameterValue()
parameters(0).Name = "QuoteFolderID"
parameters(0).Value = QFID
' parameters(0).Value = "VMBP01$VMBP01$00000242"
parameters(1) = New ParameterValue()
parameters(1).Name = "CustomerID"
parameters(1).Value = CUID
' parameters(1).Value = "12809"
parameters(2) = New ParameterValue()
parameters(2).Name = "ContactID"
parameters(2).Value = COID
' parameters(2).Value = "245"
results = rs.Render(reportPath, format, Nothing, Nothing, parameters,
Nothing, Nothing, encoding, mimeType, reportHistoryParameters, warnings,
streamIDs)
' Open a file stream and write out the report
Dim stream As FileStream = File.OpenWrite(fileName)
stream.Write(results, 0, results.Length)
stream.Close()
End Sub
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:ePkHhBdmEHA.3336@.TK2MSFTNGP10.phx.gbl...
> What user security context is used when run from the app? Try (as a test)
> setting Everyone Full Control to the directory where the file is being
> written.
> Jeff
> "Greg Clark" <gclarkmail@.yahoo.com> wrote in message
> news:#9IMhzamEHA.648@.tk2msftngp13.phx.gbl...
> > Hi,
> > I've seen one or two postings on this, and in particular 2 approaches:
> >
> > 1) running rs.exe from a stored procedure in conjunction with
xp_cmdshell.
> > I have successfully managed to create and test a stored procedure that
> > renders a report to a file share using this approach - but for some
reason
> > it doesn't work when integrated into the enterprise app I need it too
work
> > with. When the sp is initiated from the app, the report appears to be
> > generated successfully (according to the entries in the ExecutionLog
table
> > in the ReportServer database), but isn't being written to file on the
> server
> > (although it did in testing). No return errors, nothing in the
EventLog,
> > nothing, nothing, nothing. Even when rs.exe is run with the -t
parameter.
> > Very frustrating.
> >
> > 2) So, if I can do this quickly, I thought I'd look at a second approach
> i.e
> > accessing the web service directly from the stored procedure via the
> > sp_OACreate stored procedure. From a posting I've seen from Teo Lachev,
> he
> > indicates that the object to reference is MSXML2.ServerXMLHttp, with an
> > example provided. However what isn't clear to me is how this can be
used
> to
> > render and write the report to a file share, in a similar manner to the
> .rss
> > file I used in conjunction with point 1 above. Is this approach
possible?
> > or can the web service only be used to create an on-demand report back
to
> a
> > browser?
> >
> > Anyone with some examples/tips on this?
> >
> > Thanks
> > Greg
> >
> >
>

Sunday, March 11, 2012

Creating a new named instance

As understand it, the only way to add another SQL Express 2005 named instance is to run SQLEXPR32.EXE again.However, when you to, right at the end, you get the following error message:

"An installation package for the product MS SQLK Server VSS Writer cannot be found.Try the installation again using a valid copy of the installation package 'SQLWriter.msi'"

So, I deleted all named instances, and the repeated the procedure and did not get this error and it installed fine. Obviously, I would not be able to delete all instances, but in this case it didn't matter.

So, here are my questions:

Question 1) Am I correct you must rerun SQLEXPR32.EXE to create a new named instance? (I think the answer is yes)

Question 2) Is there a way to rename an existing named instance?(I think the answer is no)

Question 3) The install/uninstall for SQLEXPR32.EXE is incredibly buggy. I have spend days trying to remove an named instance with no succes. Once your remove all named instances from Control Pannel, you stll have not removed SQL Express 2005.How do you remove it?We are considering other avenues because of the incredible problems with this product. Also, we inadvertantly installed SQL Express 2005 Advanced Services, when we meant to install SQL Express 2005, so we would like to uninstall Advance Serviuces and reinstall SQL Express 2005

Question 4) I am switching from the Outlook Express newsgroups to these groups. In the context of these groups, what is the difference betwee a Forum and a Newsgroup?

Thanks

Bob

hi Bob,

BobInIndy wrote:

As understand it, the only way to add another SQL Express 2005 named instance is to run SQLEXPR32.EXE again. However, when you to, right at the end, you get the following error message:

"An installation package for the product MS SQLK Server VSS Writer cannot be found. Try the installation again using a valid copy of the installation package 'SQLWriter.msi'"

you can try unpacking the SQLExpress installer and manual install SQLWriter.msi and, eventually, SQL Native Client msi as well, as this is usually the one causing problems.. but your case does not indicates it..

So, I deleted all named instances, and the repeated the procedure and did not get this error and it installed fine. Obviously, I would not be able to delete all instances, but in this case it didn't matter.

So, here are my questions:

Question 1) Am I correct you must rerun SQLEXPR32.EXE to create a new named instance? (I think the answer is yes)

yes..

Question 2) Is there a way to rename an existing named instance? (I think the answer is no)

no

[quote]

Question 3) The install/uninstall for SQLEXPR32.EXE is incredibly buggy. I have spend days trying to remove an named instance with no succes. Once your remove all named instances from Control Pannel, you stll have not removed SQL Express 2005. How do you remove it? We are considering other avenues because of the incredible problems with this product. Also, we inadvertantly installed SQL Express 2005 Advanced Services, when we meant to install SQL Express 2005, so we would like to uninstall Advance Serviuces and reinstall SQL Express 2005

some times you have to manually remove phantoms accessing file system and registry, as described in here and/or here ..

Question 4) I am switching from the Outlook Express newsgroups to these groups. In the context of these groups, what is the difference betwee a Forum and a Newsgroup?

newsgroup are another community type, usually diffused and accessed via NNTP protocol, where forums have been designed for web access, usually with additional features like link sections, tips section and the like.. anyway this one should be consider a forum, AFAIK..

regards

Friday, February 24, 2012

creating a CSV file

Can anybody run me through the process to create a CSV file from an SQLexpress database using BCP.exe ?

Or is there a simpler way to create a CSV for that matter?

Really important and would be much appreciated.

Have a look at

http://www.codeproject.com/aspnet/ImportExportCSV.asp A Simplified SQL-CSV Import/Export Functionality

Creating a CE db at the desktop PC

Hello,

Is it possible to create a .SDF file at the develop machine?I want to write an exe which creates a sdf.So, my customer will be able to create a sdf and import this sdf to the device.

Thanks.

Hi xyzt,

Yes, you can create the .sdf either by writing an application (by calling the engine's CreateDatabase function, and scripting the schema), or with SQL Server Management Studio. You could then deliver that .sdf file to the device in your installation, or some other way.

Either way you do it, people seem to have the best results with scripting the database schema - I've heard the designers in SQL Server Management Studio need a little work.

Good luck!