Showing posts with label control. Show all posts
Showing posts with label control. Show all posts

Monday, March 26, 2012

How do I integrate with SourceSafe or TFS-VC?

Where can I find information about how to integrate a SQL 2005 database with either SourceSafe or Team Foundation Server Version Control?

I would like to have database changes for tables, views, stored procs, etc. under source control. Is this even possible?

You do not integrate the database itself with source control.

What gets integrated is your development environment. (i.e. Management Studio and BID Studio).

Basic steps are
1) Install Management Studio and BID Studio
2) Install VSS (and create source control database and users)
3a) In Management Studio create new SQL Server Scripts project / solution
3b) In BID Studio create new Integration Services Project
4) In solution explorer (for either prject), right click and select Add To Source Control.

For the most part that should do it...

Friday, March 23, 2012

How do I insert a pic in sql then bind it to a control

Hi want to add a pic to the my details table.

I then want to bind this to a repeater.

eg

<asp:Repeater id="rp1" runat="server">
<itemtemplate>
<%#Container.DataItem("PIC)"%>
</itemtemplate>
</asp:Repeater
how can i do this? what would i need to do in sql and what format would it have to be in etc. ThanksHere's an article that Das wrote on how to do that:Retrieving Images from SqlServer and displaying in a DataGrid - ASP .NET

Also, search this forum for the word "Image" and you will see some lengthy discussions on the topic. Basically, previously the wisdom had been to store the images in the file system and then you store the file name in SQL. But there are advantages to doing it the way you are describing.

Terri

Monday, March 12, 2012

How do i get Data Type of Each Column in a Sqldatasource control?

Let's say... the sqldatasource has 3 columns: TableKey(int), TableName(string) and StartDate(datetime) and i'm writing a method to return the data type based on the column name.. for example: GetDataType("StartDate") should return "datetime"...what should i do?

I think this is what you need:http://www.java2s.com/Code/VB/Database-ADO.net/GetColunmDatatype.htm

Good luck.

|||

Thanks.

How do I get a database from mysql server 2005 to Plesk hosting?

i've got a database stored on my computer using mysql server 2005, and I've just registered for hosting which uses the Plesk control panel.

In plesk I've setup a database and relevant user. What the easiest way of exporting the whole database on my computer and getting it onto my hosting account?

Hi littlened,

I'm sorry to tell you that Wsoft Plesk is a third party tool and is not supported in this forum.For how to import/export from/to Plesk, you can visit their official site(http://www.swsoft.com/plesk/) or contact your database hosting company directly. thanks

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

|||

Lighten up Bo Chen,

If you dont know the answer, don't bother to reply to littlened's thread.

LittleNed, The answer is to download a webapp called phpmyadmin. This is a php based tool which is also in the plesk panel.

This tool can be downloaded via sourceforge and will allow you to export your whole database into a compatible .sql script file, which you can execute on your hosting account db.

I hope I have made sense and God bless you in your data migration.

|||

You should check out the SQL Server Hosting Toolkit on CodePlex:http://www.codeplex.com/sqlhost

The Toolkit can help you deploy your local database to your remote server. Note that you probably need permissions to create a database on your remote server. Plesk has an option to create a database though (if your hosting company provides it). Go to your domain, select databases and add the information necessary. Then you can use the Toolkit to script your database structure and data.

Hope this helps!

|||

Hi, Thanks for that.

I use PHPMYSQL alot when I'm using PHP, so I know all about it, however I found out I can use SQL to copy a database directly to my hosting company, and manage the database through SQL or VS

|||oh. you mean sql server 2005 I thought the article was about a mysql database migration. I am not that fluent in sql server 2005 but am in 2000. if your server has an enterprise manager installed you can right click on the db and choose to generate a sql script of the structure the export the data to a .csv. these should then be easily transferrable onto your hosting environment system. this is assuming that the hosting db is only accessible via control panel. if not, you simply need to perform a dts.

Friday, February 24, 2012

How do I embed and retrieve Crystal Reports from my app

Using VB .Net 2005 with Crystal Reports XI Release 2. I have a form that has a CrystalReportViewer control on it. When someone prints I run a sub that create a new instance of the form, creates a new reportdocument, loads the report to the new document, then passes the document to the report viewer on the form. This works great except I would like to either embed my crystal reports directly into my app or better yet embed them into thier own reports dll file. I want to do this so updates are easier and I can use the "Publish" function of VB 05 which doesn't seem to like publishing all the seperate files. The embedding should be the easy part, just set them as embedded resource. But I'm having trouble with the syntax to pull them out. For example you can use this to pull out a embdded icon:
Function GetEmbeddedIcon(ByVal strName As String) As Icon
Return New Icon(System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(strName))
End Function

But I cannot get the syntax right to pull out and return a crystal report. Anyone have any ideas on how to pull the reports back out or a better way to do this. I dont have a lot of reports, about 15 right now, but that could grow.

-AllanWell...I couldn't find the answer anywhere and no one replied here. But I figured it out so I might as well help someone down the road.

Set your crystal reports to "embedded resource" and the copy to "do not copy". Then in your code you can clal them like any other object with a "New (reportname)". For example I have a crystal reports viewer control (apptly named CrystalReportViewer) on a form called ReportViewerForm. I made a small sub to print reports:

Friend Sub PrintReports(ByVal myReportFileName As ReportDocument, Optional ByVal mySQLFormula As String = "")
' Prints out reports pass to it by other procedures and forms.
Dim PrintPreview As New ReportViewerForm
Try
If mySQLFormula <> "" Then myReportFileName.RecordSelectionFormula = mySQLFormula
PrintPreview.CrystalReportViewer.ReportSource = myReportFileName
PrintPreview.ShowDialog()
Catch ex As CrystalDecisions.CrystalReports.Engine.EngineException
MsgBox("A error was generated by the Crystal Reports engine. Error details: " & ex.Message, MsgBoxStyle.Critical, "Engine Error")
Finally
myReportFileName = Nothing
PrintPreview = Nothing
End Try
End Sub

Then when I need to print a report, for example my Log report (called LogEntryReport.rpt) I call it like this:

PrintReports(New LogEntryReport, "{qLogEntryReport.LogIdNumber} = " & CurrentLogId)

passing my report as a new ReportDocument and my sql command (which is optional for those reports that don't need it). Now I can have one routine that will display reports and call it from anywhere passing the report name. Works dandy and the reports are embedded in the app...less clutter.

Hopefully this helps someone and its not a waste of bandwidth.

-Allan.

Sunday, February 19, 2012

How do I display/upgrade SQL license Info

In SQL 2000 you went to Control Panel and SQL Licensing to view licensing mode and qty. I have searched everywhere for the equivelant in 2005 including books online, knowledge base but can't find anything.

Anybody know where it is hidden as I need to check this server is set up for per processor and check how many processors?

Thanks

Richard

This does not exist in SQL Server 2005, it works by the honour system