|
mkhprogrammer@yahoo.com wrote:
1)How can i retrieve a binary field (image field) that stored in SqlServer2000 with Vb.Net and save
it again in my hard disk that i have again that file?
How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET[^]
mkhprogrammer@yahoo.com wrote:
2)can SqlServer itself convert image field to file with its store procedures?
No. The T-SQL doesn't have any function that can do that.
mkhprogrammer@yahoo.com wrote:
3)can sqlserver run an exe file on local computer from its storeprocedure?
No. The SQL Server has no rights to anything on the local machine and, therefore, no rights to execute anything on the local machine.
|
|
|
|
|
I want to create an email containing a "click here to see your files" link. I know how to create and send an email. I know the path to the files. I don't know how to make the path a link within the email.
Thanks!
|
|
|
|
|
Do you want to create an application for e-mail or you want to do it some where in Outlook express or Microsoft Office Outlook? Please provide more clearly information.
|
|
|
|
|
The application sends an email using SMTP. The recipient is using Outlook.
|
|
|
|
|
I have a form and I want to like print only part of the form, lets say a rectangular area on the form. How can I do it in visual basic 6.
Any comments will be highly appreciated
|
|
|
|
|
I'm using the following code. I want to send a populated CrystalReport to a location as a PDF when the Totals button is clicked. When I keep what is between the *'s, nothing gets exported, there are no errors either. When I comment out what is between the *'s, the unpopulated .rpt file gets sent to the destination as a PDF.
Please Help!
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim tDay As Integer
Dim tCall As Integer
Dim DD As DateTime
Dim CallActivity As DateTime
tDay = Integer.Parse(txtPast.Text)
tCall = Integer.Parse(txtCall.Text)
DD = Today.AddDays(-tDay)
CallActivity = Today.AddDays(-tCall)
Dim UD As DateTime
UD = lblUpDOB.Text.Trim
Dim LD As DateTime
LD = lblLowDOB.Text.Trim
SetReportParam(txtGender.Text, txtRace.Text, UD, LD, ddlSite.SelectedItem.Value, DD, CallActivity)
End If
End Sub
Private Sub SetReportParam(ByVal SexID As String, ByVal RaceID As String, ByVal UpDOB As DateTime, ByVal LowDOB As DateTime, ByVal SiteID As String, ByVal DD As DateTime, ByVal CallActivity As DateTime)
rDoc1.Load("path to .rpt")
Dim logonInfo As New TableLogOnInfo()
Dim i As Integer
For i = 0 To rDoc1.Database.Tables.Count - 1
logonInfo.ConnectionInfo.ServerName = "servername"
logonInfo.ConnectionInfo.DatabaseName = "dbname"
logonInfo.ConnectionInfo.UserID = "uid"
logonInfo.ConnectionInfo.Password = "pwd"
rDoc1.Database.Tables.Item(i).ApplyLogOnInfo(logonInfo)
Next
Dim paramFields As New ParameterFields()
Dim paramField As New ParameterField()
Dim discreteValue As New ParameterDiscreteValue()
Dim rangeValue As New ParameterRangeValue()
paramField.ParameterFieldName = "SexID"
discreteValue.Value = SexID
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
paramField.ParameterFieldName = "RaceID"
discreteValue.Value = RaceID
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
paramField.ParameterFieldName = "LBirth"
discreteValue.Value = UpDOB
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
paramField.ParameterFieldName = "UBirth"
discreteValue.Value = LowDOB
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
paramField.ParameterFieldName = "SiteID"
discreteValue.Value = SiteID
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
paramField.ParameterFieldName = "DD"
discreteValue.Value = DD
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
paramField.ParameterFieldName = "CallActivity"
discreteValue.Value = CallActivity
paramField.CurrentValues.Add(discreteValue)
paramFields.Add(paramField)
End Sub
Private Sub btnTotals_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotals.Click
Dim tDay As Integer
Dim tCall As Integer
Dim DD As DateTime
Dim CallActivity As DateTime
tDay = Integer.Parse(txtPast.Text)
tCall = Integer.Parse(txtCall.Text)
DD = Today.AddDays(-tDay)
CallActivity = Today.AddDays(-tCall)
Dim UD As DateTime
UD = lblUpDOB.Text.Trim
Dim LD As DateTime
LD = lblLowDOB.Text.Trim
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As New DiskFileDestinationOptions()
Dim Fname As String
crReportDocument = New ReportDocument()
crReportDocument.Load("path to .rpt")
Dim logonInfo As New TableLogOnInfo()
Dim i As Integer
For i = 0 To crReportDocument.Database.Tables.Count - 1
logonInfo.ConnectionInfo.ServerName = "servername"
logonInfo.ConnectionInfo.DatabaseName = "dbname"
logonInfo.ConnectionInfo.UserID = "uid"
logonInfo.ConnectionInfo.Password = "pwd"
crReportDocument.Database.Tables.Item(i).ApplyLogOnInfo(logonInfo)
Next
Dim N As String
N = "CallSheets" & ddlSite.SelectedItem.Text & Now & ".pdf"
N = Replace(N, Chr(32), "")
N = Replace(N, ":", "")
N = Replace(N, "/", "")
N = Replace(N, ",", "")
Fname = "path to destination" & N
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportFormatType = ExportFormatType.PortableDocFormat
.ExportDestinationType = ExportDestinationType.DiskFile
End With
Dim discreteParam As New ParameterDiscreteValue()
Dim paramField As ParameterFieldDefinition
Dim defaultValue As ParameterValues
'***********************************************************
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@SexID")
discreteParam.Value = txtGender.Text.Trim
defaultValue = paramField.DefaultValues()
defaultValue.Add(discreteParam)
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@RaceID")
discreteParam.Value = txtRace.Text.Trim
defaultValue = paramField.DefaultValues
defaultValue.Add(discreteParam)
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@LBirth")
discreteParam.Value = UD
defaultValue = paramField.DefaultValues
defaultValue.Add(discreteParam)
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@UBirth")
discreteParam.Value = LD
defaultValue = paramField.DefaultValues
defaultValue.Add(discreteParam)
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@SiteID")
discreteParam.Value = ddlSite.SelectedItem.Value
defaultValue = paramField.DefaultValues
defaultValue.Add(discreteParam)
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@DD")
discreteParam.Value = DD
defaultValue = paramField.DefaultValues
defaultValue.Add(discreteParam)
paramField = crReportDocument.DataDefinition.ParameterFields.Item("@CallActivity")
discreteParam.Value = CallActivity
defaultValue = paramField.DefaultValues
defaultValue.Add(discreteParam)
paramField.ApplyCurrentValues(defaultValue)
'**************************************************
crReportDocument.Export()
End Sub
|
|
|
|
|
Hi all
Does anyone know how to implement something along the lines of the "page preview" mode in word, in either vb6 or .net?
I have googled everywhere to no avail, other than finding highly expensive controls that are way too complicated for my purposes to justify the cost.
All I need is simple richtext editing facilities that the richtextbox already provides, but to display it in the "page" view that word can.
Thanks for your comments.
null
|
|
|
|
|
You'll either have to re-write the RichTextBox control yourself or go with a 3rd party control. The RichTextBox class doesn't support the kind of "page" view your talking about.
[EDIT]
I should have clarified that this will be a large undertaking. The RTB does a half way decent job of editing, but not with the margins and page break support your looking for. I don't even know where your going to begin. This is something where you'll have to try a couple ideas first to see what's going to work and what's not. Kind of Proof-Of-Concept testing...
You'll need to integrate the rendering of margins as specified by PrinterSettings. You'll also need to get the page size, convert all the measurements into display units, handle ALL control rendering, editing, RTF rendering, ...
Come to think about it, that's why the 3rd party controls are so expensive. Too much is invested in research and development making the very component you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Im not worried about the printersettings. Thats something I can already do. Im just scratching my head as to how you get a scrolling page view! lol. I've previously played with pictureboxes as containers etc, just wondered if there was a known avenue to pursue.
|
|
|
|
|
I am developping com addins for word.
I want to find out if there is a way to click
on the customized button in toolbar programmatically.
I tried to call like this in module.
Application.CommandBars("MYWORDTOOLBAR_NAME").FindControl("MYBUTTON").execute
but I am just getting this error message
"fail method "Execute" of object CommandBarButton"
Do you have any idea why?
van
|
|
|
|
|
You might want to break that statement up and see if .FindControl("MYBUTTON") actually returned a CommandBarButton before you try and call .Execute() on it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hey,
I have a file path, and from this i want to select a printer on the client by using its name (PDF Printer) and choose to print the file. When the printer is passed a file to print it opens a 'Save File As' dialog box where you choose the save destination and file name of the PDF.
I need a way to specify the destination path and filename of the PDF to be saved and to be able to hide this 'Save File As' dialog box so the user never sees it.
I am using CutePDF Writer and there is a code sample to help here[^]
But i am unable to have any luck
Can anybody help with any hints or suggestions
Thanks you for your time
Chris
|
|
|
|
|
What do you mean by "not having any luck"? What's happening? What's not happening?
What does your code look like? Are you typing the Registry path names and values names EXACTLY as shown?
Normally, you would go to the products support site for assistance with the component. CodeProject deals with the languages themselves, not 3rd party components...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hey,
i was typing it as shown. i dont have much experience of registry values.
First of is all is it possible to make the 'save as' dialog not show and pass information and key presses to it?
Cheers
Chris
|
|
|
|
|
No, you can't prevent it from happening unless the driver exposes any interface to do so. It looks like the only interface supplied by the manufacter of the .PDF Printer Driver is the registry hack. If it doesn't work, then your best bet is to either contact the manufacturer for support on the component (and possibly an update) or find another component that has the (working) functionality you need.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi!! i have used WinInet APIs to work with FTP sessions in VB6. No i'm thinking of writing the same in VB.NET. i'm not able to find a suitable namespace to work with the same WinInet API. What namespace can i use and whats the way i tackle this. i don wanna use any third party components ans wanna write a class of my own. pls suggest
Thankz in advance
|
|
|
|
|
System.Net
System.Net.Sockets
FTP is just a socket application using a pre-determined format of messages, usually on port 21.
|
|
|
|
|
|
There is also a namespace for FTP in the Visual Studio 2005
|
|
|
|
|
How to access a File Transfer Protocol site by using Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;832679
|
|
|
|
|
Hi,
Does anyone know how to make a "CommonDialog", in particular the "SaveFileDialog" always be on top? Like setting the "TopMost" property of a form to true. I want the file dialog to appear on top of all running applications.
Best regards /Emily
|
|
|
|
|
Use the property .ShowDialog() this makes the dialog application modal and will always be on top of your app. But you could make it System modal and then it will be the top most cos the dialog will have to be closed before the system is aloud to be used once more.
HTH
Chris
|
|
|
|
|
Hi,
Thanks for your answear!
I already use the property .ShowDialog(). But I want the file dialog not only to be on top of my app, but also on top of all other app's like with the TopMost property. Is that "System modal"? How do I make it "System modal"?
/Emily
|
|
|
|
|
Hey
i am not to sure how to make a form or dialog system modal but i did find this[^] article. Perhaps using the Win32 API?
Have you tried making a custom save dialog box using a new form and possibly set that forms property to top most. There are tutorials out there to make your own save dialog box.
HTH
Chris
|
|
|
|
|
Hi,
Thanks again.
I have not tried to make my own save dialog box, I migt have to do that if I do not find another solution.
By the way, I'm writing the application in VB.Net if that makes any difference.
Maybe I should look at the Win32 API but it would be nice to avoid using it from my .Net app.
/Emily
|
|
|
|