SubreportProcessingEventHandler is not firing even without parameters in the subreport - rdlc

I'm trying to use the subreport component in my main report but does not fire the event SubreportProcessingEventHandler even without any parameter in the sub-report that can generate any errors.
public ActionResult MyReport(DateTime dateReport)
{
var root = Path.GetDirectoryName(this.Server.MapPath("~"));
if (string.IsNullOrEmpty(root))
{
return this.HttpNotFound();
}
var path = Path.Combine(root, "bin\\Reports\\MainReport.rdlc");
if (System.IO.File.Exists(path))
{
this.reportViewer.LocalReport.ReportPath = path;
}
else
{
return this.View("Index");
}
this.LoadData(dateReport);
var reportType = "PDF";
string mimeType;
string encoding;
string fileNameExtension;
var deviceInfo = "<DeviceInfo>" + " <OutputFormat>" + reportType + "</OutputFormat>"
+ " <PageWidth>8.5in</PageWidth>" + " <PageHeight>11in</PageHeight>"
+ " <MarginTop>0.2in</MarginTop>" + " <MarginLeft>0.4in</MarginLeft>"
+ " <MarginRight>0.4in</MarginRight>" + " <MarginBottom>0.1in</MarginBottom>"
+ "</DeviceInfo>";
Warning[] warnings;
string[] streams;
var renderedBytes = this.reportViewer.LocalReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
return this.File(renderedBytes, mimeType);
}
private void LoadData(DateTime dateReport)
{
........
this.reportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(this.MySubreportEventHandler);
this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("UserDataSet", users.DistinctBy(u => u.UserName)));
this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("EluateReportDataSet", radiopharmacyEluateReports));
this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("MarkingProtocolReportDataSet", radiopharmacyMarkingProtocolReports));
this.reportViewer.LocalReport.Refresh();
}
public void MySubreportEventHandler(object sender, SubreportProcessingEventArgs e)
{
.....
e.DataSources.Add(new ReportDataSource("RadiopharmaceuticalQualityControlDataSet", radiopharmacyReportQualityControls));
}
I have checked the output and this warning is raised:
Warning: Warnings occurred while executing the subreport ‘Subreport1’. (rsWarningExecutingSubreport)

After more detailed observation, i noticed that subreport really need an parameter that matches with a parameter passed by main report. Without any parameter the subreport just don't work.

Related

ASP .Net Core file upload - getting form data when [DisableFormValueModelBinding] attribute is in place

I went ahead and implemented an ASP .Net Core file upload controller per the documentation and it requires using a [DisableFormValueModelBinding] attribute for streaming large files. I got that working fine. Unfortunately, when using that attribute it seems to block my JSON properties coming in from the form.
Is there any way to get both the file and the form data here? Here is my controller code (the request.form calls are where I am having issues):
[Route("{caseNbr:int}/Document")]
[ResponseType(typeof(CaseDocumentModel))]
[DisableFormValueModelBinding]
[HttpPost]
public async Task<IActionResult> PostDocument(int caseNbr)
{
string errorTrackingFileName = string.Empty;
try
{
UserSessionModel userSessionModel = SessionExtensions.CurrentUserSession;
if (!MultipartRequestHelper.IsMultipartContentType(Request.ContentType))
{
return BadRequest("Bad Request");
}
var boundary = MultipartRequestHelper.GetBoundary(MediaTypeHeaderValue.Parse(Request.ContentType), _defaultFormOptions.MultipartBoundaryLengthLimit);
var reader = new MultipartReader(boundary, HttpContext.Request.Body);
var section = await reader.ReadNextSectionAsync();
while (section != null)
{
var hasContentDispositionHeader = ContentDispositionHeaderValue.TryParse(section.ContentDisposition, out var contentDisposition);
if (hasContentDispositionHeader)
{
if (!MultipartRequestHelper.HasFileContentDisposition(contentDisposition))
{
return BadRequest("Bad Request");
}
var fileName = WebUtility.HtmlEncode(contentDisposition.FileName.Value);
errorTrackingFileName = fileName;
var trustedFileNameForFileStorage = fileName; //Path.GetRandomFileName();
var streamedFileContent = await FileHelpers.ProcessStreamedFile(section, contentDisposition, ModelState, _permittedExtensions, _fileSizeLimit);
if (!ModelState.IsValid)
{
return BadRequest("Bad Request");
}
using (var targetStream = System.IO.File.Create(Path.Combine(_tempFilePath, trustedFileNameForFileStorage)))
{
await targetStream.WriteAsync(streamedFileContent);
**//This is where I am having trouble:**
string descrip = HttpContext.Request.Form["Description"].ToString();
string docType = HttpContext.Request.Form["DocType"].ToString() ?? "Document";
bool isGeneralFileUpload = false;
if (string.IsNullOrWhiteSpace(Request.Form["GeneralFileUpload"]) == false && AppHelper.IsBool(Request.Form["GeneralFileUpload"]))
isGeneralFileUpload = bool.Parse(Request.Form["GeneralFileUpload"]);
int transcriptionJobId = 0;
if (string.IsNullOrWhiteSpace(Request.Form["TranscriptionJobId"]) == false && AppHelper.IsNumeric(Request.Form["TranscriptionJobId"]))
transcriptionJobId = int.Parse(Request.Form["TranscriptionJobId"]);
CaseDocumentModel createdCaseDocumentModel;
if (docType.Equals("Dictation"))
createdCaseDocumentModel = DictationRepository.ProcessDictationFile(userSessionModel.DBID, caseNbr, _tempFilePath, fileName, userSessionModel);
else if (isGeneralFileUpload)
createdCaseDocumentModel = DashboardAdjusterRepository.CreateGeneralFileUploadDocument(_tempFilePath, fileName, userSessionModel, docType, descrip);
else if (docType.Equals("Transcription"))
createdCaseDocumentModel = TranscriptionRepository.UploadTranscriptionFile(userSessionModel.DBID, _tempFilePath, fileName, userSessionModel, transcriptionJobId);
else
createdCaseDocumentModel = CaseRepository.CreateCaseDocumentRecord(userSessionModel.DBID, caseNbr, descrip, docType, _tempFilePath, fileName, userSessionModel);
return Ok(createdCaseDocumentModel);
}
}
// Drain any remaining section body that hasn't been consumed and
// read the headers for the next section.
section = await reader.ReadNextSectionAsync();
}
}
catch (Exception ex)
{
AppHelper.WriteErrorLog("CaseController PostDocument failed due to " + ex.Message + " case number was " + caseNbr + " file name was " + errorTrackingFileName);
return BadRequest("Bad Request");
}
return BadRequest("Bad Request");
}
Here is a sample call with Postman:
Screen shot of Postman

Delete button stops working sporadically, only on Windows, when using our editor plugin

We are developing a markdown editor plugin for eclipse. My colleagues who are using Windows 10 encounter a bug that causes keys to stop working. The most common key is delete, other times it is ctrl + s.
Here is the code for the editor extension:
public class MarkdownEditor extends AbstractTextEditor {
private Activator activator;
private MarkdownRenderer markdownRenderer;
private IWebBrowser browser;
public MarkdownEditor() throws FileNotFoundException {
setSourceViewerConfiguration(new TextSourceViewerConfiguration());
setDocumentProvider(new TextFileDocumentProvider());
// Activator manages connections to the Workbench
activator = Activator.getDefault();
markdownRenderer = new MarkdownRenderer();
}
private IFile saveMarkdown(IEditorInput editorInput, IDocument document, IProgressMonitor progressMonitor) {
IProject project = getCurrentProject(editorInput);
String mdFileName = editorInput.getName();
String fileName = mdFileName.substring(0, mdFileName.lastIndexOf('.'));
String htmlFileName = fileName + ".html";
IFile file = project.getFile(htmlFileName);
String markdownString = "<!DOCTYPE html>\n" + "<html>" + "<head>\n" + "<meta charset=\"utf-8\">\n" + "<title>"
+ htmlFileName + "</title>\n" + "</head>" + "<body>" + markdownRenderer.render(document.get())
+ "</body>\n" + "</html>";
try {
if (!project.isOpen())
project.open(progressMonitor);
if (file.exists())
file.delete(true, progressMonitor);
if (!file.exists()) {
byte[] bytes = markdownString.getBytes();
InputStream source = new ByteArrayInputStream(bytes);
file.create(source, IResource.NONE, progressMonitor);
}
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return file;
}
private void loadFileInBrowser(IFile file) {
IWorkbench workbench = PlatformUI.getWorkbench();
try {
if (browser == null)
browser = workbench.getBrowserSupport().createBrowser(Activator.PLUGIN_ID);
URL htmlFile = FileLocator.toFileURL(file.getLocationURI().toURL());
browser.openURL(htmlFile);
IWorkbenchPartSite site = this.getSite();
IWorkbenchPart part = site.getPart();
site.getPage().activate(part);
} catch (IOException | PartInitException e) {
e.printStackTrace();
}
}
#Override
public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
super.init(site, editorInput);
IDocumentProvider documentProvider = getDocumentProvider();
IDocument document = documentProvider.getDocument(editorInput);
IFile htmlFile = saveMarkdown(editorInput, document, null);
loadFileInBrowser(htmlFile);
}
#Override
public void doSave(IProgressMonitor progressMonitor) {
IDocumentProvider documentProvider = getDocumentProvider();
if (documentProvider == null)
return;
IEditorInput editorInput = getEditorInput();
IDocument document = documentProvider.getDocument(editorInput);
if (documentProvider.isDeleted(getEditorInput())) {
if (isSaveAsAllowed()) {
/*
* 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
* Changed Behavior to make sure that if called inside a regular save (because
* of deletion of input element) there is a way to report back to the caller.
*/
performSaveAs(progressMonitor);
} else {
}
} else {
// Convert document from string to string array with each instance a single line
// of the document
String[] stringArrayOfDocument = document.get().split("\n");
String[] formattedLines = PipeTableFormat.preprocess(stringArrayOfDocument);
StringBuilder builder = new StringBuilder();
for (String line : formattedLines) {
builder.append(line);
builder.append("\n");
}
String formattedDocument = builder.toString();
// Calculating the position of the cursor
ISelectionProvider selectionProvider = this.getSelectionProvider();
ISelection selection = selectionProvider.getSelection();
int cursorLength = 0;
if (selection instanceof ITextSelection) {
ITextSelection textSelection = (ITextSelection) selection;
cursorLength = textSelection.getOffset(); // etc.
activator.log(Integer.toString(cursorLength));
}
// This sets the cursor on at the start of the file
document.set(formattedDocument);
// Move the cursor
this.setHighlightRange(cursorLength, 0, true);
IFile htmlFile = saveMarkdown(editorInput, document, progressMonitor);
loadFileInBrowser(htmlFile);
performSave(false, progressMonitor);
}
}
private IProject getCurrentProject(IEditorInput editorInput) {
IProject project = editorInput.getAdapter(IProject.class);
if (project == null) {
IResource resource = editorInput.getAdapter(IResource.class);
if (resource != null) {
project = resource.getProject();
}
}
return project;
}
}
Here is the repository: https://github.com/borisv13/GitHub-Flavored-Markdown-Eclipse-Plugin
Any help is accepted

How to download "RDL report files" from SQL Report server 2008 programatically

How can I download the "RDL report files" from SQL Report Server 2008 programatically (vb.net).
I just need to download all reports and upload all back in one click event. Is this possible?
Several times, I have used a program called SSRSExtractor (open source). It is available on CodeProject.com http://www.codeproject.com/Articles/339744/SSRS-Downloading-RDL-Files
I also had some code before to download reports from ssrs server
public void SaveAdhocReportsToFile()
{
string inputPath = "Reports";
string outPutDir = "D:\\Reports\\";
ExportListItemToFiles("/" + inputPath, ".rdl", outPutDir, ItemType.Report);
}
private void ExportListItemToFiles(string inputPath, string fileExtension, string outPutFolder, string itemType)
{
try
{
Console.WriteLine("Exporting " + itemType + " from SSRS - folder " + inputPath + " to " + outPutFolder);
string outPutFile = string.Empty;
List<CatalogItem> items = ReportService.ListChildren(inputPath, false).Where(x => x.TypeName == itemType).ToList();
foreach (CatalogItem item in items)
{
byte[] rpt_def = null;
XmlDocument doc = new XmlDocument();
rpt_def = ReportService.GetItemDefinition(item.Path);
MemoryStream stream = new MemoryStream(rpt_def);
outPutFile = string.Format(#"{0}{1}" + fileExtension, outPutFolder, item.Name);
if (File.Exists(outPutFile))
File.Delete(outPutFile);
doc.Load(stream);
doc.Save(outPutFile);
}
}
catch (SoapException ex)
{
throw new Exception(ex.Message);
}
}
You can refer to ReportingService2010 Methods: https://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010_methods%28v=sql.120%29.aspx

Error code 706 when signing PDF using Web Agent in Java

When testing the Web Agent sample in Java, I am getting an error reply
<?xml version="1.0" encoding="utf-8"?>
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="error">
<Error>
<returnCode>706</returnCode>
<errorMessage>Value cannot be null.
Parameter name: s</errorMessage>
</Error>
</response>
I followed the Ruby example in the CoSign Web Agent samples and the documentation
I have used the demo.pdf file provided in the sample.
This is the XML (from test app) sent in the POST request (the <content></content> has the Base64 encoded PDF, but omitted because of length).
<?xml version="1.0" encoding="utf-8" ?>
<request>
<Logic>
<allowAdHoc>true</allowAdHoc>
<workingMode>pull</workingMode>
<enforceReason>false</enforceReason>
</Logic>
<Url>
<finishURL>http://localhost:64956/retrieveSignedFile.aspx</finishURL>
</Url>
<Document>
<fileID>1234567890</fileID>
<contentType>pdf</contentType>
<content>{BASE64 encoded pdf content}</content>
</Document>
</request>
The following is the java code I have used:
public class CoSignTest {
private static final String INPUT = "D:\\tmp\\demo.pdf";
private static final String PRECONTENT = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
"<request>\n" +
" <Logic>\n" +
" <allowAdHoc>true</allowAdHoc>\n" +
" <workingMode>pull</workingMode>\n" +
" <enforceReason>false</enforceReason>\n" +
" </Logic>\n" +
" <Url>\n" +
" <finishURL>http://localhost:64956/retrieveSignedFile.aspx</finishURL>\n" +
" </Url>\n" +
" <Document>\n" +
" <fileID>1234567890</fileID>\n" +
" <contentType>pdf</contentType>\n" +
" <content>";
private static final String POSTCONTENT = "</content>\n" +
" </Document>\n" +
"</request>";
private static final String POST_URL = "https://webagentdev.arx.com/Sign/UploadFileToSign";
private static final String PULL_URL = "https://webagentdev.arx.com/Sign/DownloadSignedFileG";
public static final int TIMEOUT = 300000;
public static void main(String[] args) throws Exception {
InputStream is = new FileInputStream(INPUT);
String content = PRECONTENT + new String(Base64.encodeBase64(loadResource(is)), "UTF-8") + POSTCONTENT;
System.out.println(content);
String reply = new String(sendDocForProcessing(URLEncoder.encode(content, "UTF-8")));
System.out.println(reply);
System.out.println("DONE");
}
private static String sendDocForProcessing(String content) throws Exception {
HttpClient client = null;
HttpMethodBase method = null;
SimpleHttpConnectionManager mgr = new SimpleHttpConnectionManager();
String reply = "";
try {
mgr.getParams().setConnectionTimeout(TIMEOUT);
mgr.getParams().setSoTimeout(TIMEOUT);
client = new HttpClient(mgr);
method = new PostMethod(POST_URL);
method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(1, false));
method.getParams().setParameter("http.socket.timeout", TIMEOUT);
client.getHttpConnectionManager().getParams().setConnectionTimeout(TIMEOUT);
client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
method.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
method.getParams().setParameter("inputXML", content);
client.executeMethod(method);
reply = new String(method.getResponseBody());
} catch (Exception e) {
e.printStackTrace();
} finally {
if(method != null) {
method.releaseConnection();
}
client = null;
mgr.shutdown();
}
if (isSigningSuccessful(reply)) {
return reply;
} else {
throw new Exception("Failed in signing the document. Error: " + reply);
}
}
private static boolean isSigningSuccessful(String reply) throws ParserConfigurationException, IOException, SAXException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new ByteArrayInputStream(reply.getBytes()));
Element elem = doc.getDocumentElement();
String type = elem.getAttribute("type");
return !"error".equals(type);
}
public static byte[] loadResource(InputStream in) {
if (in == null) {
return new byte[0];
}
try {
int indice, tempIndice;
byte[] tempArr;
byte[] mainArr = new byte[0];
byte[] byteArr = new byte[65535];
for (indice = 0; (indice = in.read(byteArr)) > 0;) {
tempIndice = mainArr.length + indice;
tempArr = new byte[tempIndice];
System.arraycopy(mainArr, 0, tempArr, 0, mainArr.length);
System.arraycopy(byteArr, 0, tempArr, mainArr.length, indice);
mainArr = tempArr;
}
in.close();
return mainArr;
} catch (Exception e) {
e.printStackTrace();
}
return new byte[0];
}
}
The XML elements are case sensitive and must be passed as shown in the documentation (e.g. Document instead of document, Auth instead of auth and so on). In addition, your XML request is missing the finishURL parameter which is mandatory.
Also note that some parameters in your XML request are obsolete. See the updated request parameter list in the link above. A sample XML is available here.
Thanks for adding your Java code. Note that the HttpClient instance is configured incorrectly and as a result the http-post request is sent empty. Take a look at the modifications I did in your sendDocForProcessing function in order to properly post the XML content:
private static String sendDocForProcessing(String content) throws Exception {
HttpClient client = null;
PostMethod method = null;
String reply = "";
try {
client = new HttpClient();
method = new PostMethod(POST_URL);
method.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
NameValuePair[] data = { new NameValuePair("inputXML", content) };
method.setRequestBody(data);
client.executeMethod(method);
reply = method.getResponseBodyAsString();
} catch (Exception e) {
e.printStackTrace();
} finally {
if(method != null) {
method.releaseConnection();
}
}
if (isSigningSuccessful(reply)) {
return reply;
} else {
throw new Exception("Failed in signing the document. Error: " + reply);
}
}
The content passed to the above function should not be URL-encoded as it is already done by the HttpClient library.
In addition, when analyzing the response, I suggest you to check the value of the returnCode element rather than the type property. The response is always of type 'error'.
Also note that the function name isSigningSuccessful is misleading as this stage is still prior to the act of signing.

Sybase SQL request via VB-Script

I'd like to make a SQL request via a VBScript called by a CMD.
The Database is a Sybase Server and this is the problem, I can't find
any documentation about this, only MS SQL and stuff like this.
But it doesn't have to be a complex way like this, if somebody knows a small
tool that will output the request when it is executed I would be happy too.
But The main objective is, to output the requested datas as the programm (or script)
is executed.
UPDATE
I found something, that might be helpful
Dim OdbcDSN
Dim connect, sql, resultSet
OdbcDSN = "******;UID=*******;PWD=*****"
Set connect = CreateObject("ADODB.Connection")
connect.Open OdbcDSN
sql="SELECT * FROM **********..********** WHERE ******* = 1 AND Name = %given parameter%"
resultSet.Close
connect.Close
Set connect = Nothing
WScript.Quit(0)
Additonal Note: the batch (or whatever) will be executed by a a telefon client which will call the batch (or program) with a paramater, the name, of the person which is calling.
so if i can build the parameter into the query, that would be great.
I have the same task and it looks like you just cant connect using standard ADODB.Connection. I made some research and found that you should use iAnywhere.Data.SQLAnywhere lib and its own SybaseConnector.Connector to connect to Sybase.
Instead of using batch to call vb vbscript file you can make your own COM object with SybaseConnector, register it to your system and create new object or make executable that takes sonnection string and query. I can share source with you.
Set up Sybase IQ 15.4 dev edition, then create project in Visual Studio and make reference to .NET component iAnywhere.Data.SQLAnywhere.
Then use this code:
using System;
using System.Collections.Generic;
using System.Text;
using iAnywhere.Data.SQLAnywhere;
using System.Diagnostics;
using System.Data;
namespace SybaseConnector
{
public class Connector
{
private SAConnection _myConnection { get; set; }
private SADataReader _data { get; set; }
private SACommand _comm { get; set; }
private SAConnectionStringBuilder _conStr { get; set; }
public bool isDebug { get; set; }
public Connector(string UserID, string Password, string CommLinks, string ServerName, string command)
{
_conStr = new SAConnectionStringBuilder();
// dynamic
_conStr.UserID = UserID; //"dba";
_conStr.Password = Password; //"sql";
_conStr.CommLinks = CommLinks; //#"TCPIP{IP=servername;ServerPort=2638}";
_conStr.ServerName = ServerName; //"northwind";
// static
_conStr.Compress = "NO";
_conStr.DisableMultiRowFetch = "NO";
_conStr.Encryption = "NONE";
_conStr.Integrated = "NO";
this.Connect();
this.ExecuteCommand(command);
this.WriteResult();
}
public void Connect()
{
_myConnection = new SAConnection();
_myConnection.StateChange += new StateChangeEventHandler(ConnectionControl);
if (_conStr.ToString() != String.Empty)
{
try
{
_myConnection.ConnectionString = _conStr.ToString();
_myConnection.Open();
}
catch(Exception e)
{
if ((int)_myConnection.State == 0)
{
_myConnection.Dispose();
WriteDebug("Exception data:\n" + e.Data + "\n" +
"Exception message:\n" + e.Message + "\n" +
"Inner exception:\n" + e.InnerException + "\n" +
"StackTrace:\n" + e.StackTrace);
}
}
}
}
public void ExecuteCommand(string com, int timeout = 600)
{
if ((int)_myConnection.State != 0)
{
_comm = new SACommand();
_comm.CommandText = com;
_comm.CommandTimeout = timeout;
_comm.Connection = _myConnection;
try
{
_data = _comm.ExecuteReader();
}
catch (Exception e)
{
WriteDebug("Exception data:\n" + e.Data + "\n" +
"Exception message:\n" + e.Message + "\n" +
"Inner exception:\n" + e.InnerException + "\n" +
"StackTrace:\n" + e.StackTrace);
}
}
else
{
WriteDebug("Exception occured:\n" +
"Connection has been closed before the command has been executed.");
}
}
private void ConnectionControl(object sender, StateChangeEventArgs e)
{
WriteDebug(sender.GetType().ToString() + ": Connection state changed to " + e.CurrentState.ToString());
}
public void SetMaxReconnectCount(int count)
{
_reconnectCounter = count;
}
public void Dispose()
{
_comm.Dispose();
_data.Dispose();
_myConnection.Close();
_myConnection.Dispose();
}
private void WriteResult()
{
var output = new StringBuilder();
int count = _data.FieldCount;
// аппенд в строку и вывод в ивент одним объектом
for (int i = 0; i < count; i++)
{
if (i == count - 1)
{
output.Append(_data.GetName(i) + "\n");
}
else
{
output.Append(_data.GetName(i) + "\t");
}
}
while (_data.Read())
{
for (int i = 0; i < count; i++)
{
if (i == count - 1)
{
output.Append(_data.GetValue(i) + "\n");
}
else
{
output.Append(_data.GetValue(i) + "\t");
}
}
}
WriteDebug(output.ToString());
}
private void WriteDebug(string str, EventLogEntryType type = EventLogEntryType.Information)
{
System.Diagnostics.EventLog appLog = new System.Diagnostics.EventLog();
appLog.Source = "SQL SybaseConnector";
appLog.WriteEntry(str, EventLogEntryType.Information);
}
}
}
set [ComVisible(true)] flag if you gonna use it as COM object.
Compile project and register your dll with command
>regasm myTest.dll
then with your vbscript code
Dim obj
Set obj = CreateObject("SybaseConnector.Connector")
Call obj.Connector("user","password","TCPIP{IP=host;ServerPort=2638}","northwind",command)