From jwcolby at colbyconsulting.com Sun May 2 09:53:27 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 10:53:27 -0400 Subject: [dba-VB] VB.Net Message-ID: I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com From mikedorism at adelphia.net Sun May 2 13:48:37 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Sun, 2 May 2004 14:48:37 -0400 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: <000001c43076$14a5c960$cc0aa845@hargrove.internal> VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 2 16:27:19 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 17:27:19 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <000001c43076$14a5c960$cc0aa845@hargrove.internal> Message-ID: yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at afsweb.com Sun May 2 11:24:06 2004 From: ebarro at afsweb.com (Eric Barro) Date: Sun, 2 May 2004 09:24:06 -0700 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: John, Here's the "equivalent" code snippet for .NET Sub GetData(CommandText as string) 'we use the sqldata reader; for ms access use OleDBDataReader which has the same properties and syntax Dim myData As SQLDataReader 'this is the corresponding connection object Dim myConnection As New SqlConnection(ConnectionString) 'this is the corresponding command object Dim myCommand As New SqlCommand(CommandText, myConnection) myConnection.Open() 'this is the corresponding rst.open statement myData = myCommand.ExecuteReader() 'this is the corresponding do while not rst.eof statement While myData.Read() 'and this is where we grab the recordset values and assign to form controls or variables myFormField.text = myData("myFieldName") End While End Sub --- Eric Barro Senior Systems Analyst Advanced Field Services (208) 772-7060 http://www.afsweb.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 7:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 From Jdemarco at hudsonhealthplan.org Sun May 2 21:03:05 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Sun, 2 May 2004 22:03:05 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jwcolby at colbyconsulting.com Sun May 2 21:47:16 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 22:47:16 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> Message-ID: Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Mon May 3 09:07:14 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Mon, 3 May 2004 10:07:14 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE872@TTNEXCHSRV1.hshhp.com> Yes that's fairly common code. Jim D. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 10:47 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From paul.hartland at fsmail.net Thu May 6 03:12:09 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 10:12:09 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <1133992.1083831129696.JavaMail.www@wwinf3001> To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From mark at markkaren.com Thu May 6 07:42:27 2004 From: mark at markkaren.com (Mark Rider) Date: Thu, 6 May 2004 07:42:27 -0500 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: <200405061242.i46CgqQ01290@databaseadvisors.com> Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Thu May 6 08:30:50 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 15:30:50 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <15110875.1083850250229.JavaMail.www@wwinf3002> Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. Thanks for all your help. Message date : May 06 2004, 01:54 PM >From : "Mark Rider" To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com Copy to : Subject : RE: [dba-VB] OT - HTML & ASP Help Required Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge & Co. Internet Reporting System Enter Username & Password Below Username: Password: NAME="Submit" VALUE="Submit"> checklogin.asp code is below: Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From martyconnelly at shaw.ca Thu May 6 15:04:07 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 06 May 2004 13:04:07 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required References: <15110875.1083850250229.JavaMail.www@wwinf3002> Message-ID: <409A9A37.5030600@shaw.ca> Charles Carrol's site is good for info http://www.learnasp.com/learn/index.asp I think his ASP mail lists moved here http://aspadvice.com/login.aspx?ReturnUrl=%2fsignup%2flist.aspx or http://www.genericdb.com One thing that will save you time switching from home to work and use relative path addressing Use Server.MapPath() whenever referring to files stored locally on the server instead of a static path (except in the rare occasions where it's necessary). dbConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.Mappath("/mywebfolder/") & "\myfolder\edge.mdb;" paul.hartland at fsmail.net wrote: >Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. >Thanks for all your help. > > > > > >Message date : May 06 2004, 01:54 PM >>From : "Mark Rider" >To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com >Copy to : >Subject : RE: [dba-VB] OT - HTML & ASP Help Required >Not sure of the exact problem, but it appears to be something with accessing >the IIS at work. It sounds like you are pointing to the files themselves >rather than the IIS Server. The way to get to the pages should be something >like : >http://OfficeIIS_Server/default.htm > >If you are simply trying to open the page through File | Open you are not >actually going thru the IIS Server, and the Download message will appear. > >Hope this helps! > >Mark Rider > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of >paul.hartland at fsmail.net >Sent: Thursday, May 06, 2004 3:12 AM >To: dba-vb >Subject: [dba-VB] OT - HTML & ASP Help Required > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a Windows >2000 server with IIS installed in the C:\Inetpub\wwwroot directory along >with the ASP code which is saved as checklogin.asp in the same directory. >On my Windows 98 machine at home with Personal Web Server (PWS) installed it >runs fine, however when trying to run it on our server in the office it just >displays the ASP code when the checklogin.asl page is called, and if you try >it from a desktop it comes up with a you are about to download >checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP >etc. > >default.htm code below: > > > > > > > > >Orridge & Co. Internet >Reporting System > > >Enter Username & >Password Below > > > > > > >Username: > > > >Password: > > > > NAME="Submit" VALUE="Submit"> > > > > > > > > > > > > >checklogin.asp code is below: > > > > > > >Thanks in advance for any help. > >Paul Hartland > >-- > >Whatever you Wanadoo: >http://www.wanadoo.co.uk/time/ > >This email has been checked for most known viruses - find out more at: >http://www.wanadoo.co.uk/help/id/7098.htm >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada From accessd at shaw.ca Thu May 6 20:13:02 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 06 May 2004 18:13:02 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: Hi Paul: There are a whole wack of issues that may not allow your code to run. The first thing to do is to make sure that have your virtual site set up. 1. This is done through your IIS, 'Default Web Site'. (This is your base site template.) 2. Go to the 'Home directory' tab, Configuration button, application mapping and make sure the '.asp' extension is mapped. Assuming that the '.asp' extension is displayed and the appropriate 'asp.dll' is there...you can check the directories to be overly careful. 3. Double click, to see if all HTML processes are activated 'POST,GET, etc...'. 4. Then the 'Application' Option tab and make sure VBScript is the default. (Not necessary but let's keep things simple.) 5. On the 'Home Directory' tab, make sure that the 'Execute Permission' has 'Script Only' selected, at least. 6. On your 'Documents' tab, if you are starting your website, running an asp file, you have to add something like 'index.asp' or 'default.asp'. (This is only done if you do not want have to key in the start file (index.asp) every time.) 7. If you are not logging into the server through a networked station, in order to run a locally stored web page, you have to access it like: 'http://localhost/MyWebSiteDirectory/index.asp'. (Note if you are accessing the web site, on your server, from your network station, use something like: http://192.168.123.1/MyWebDirectory/index.asp. 8. Make sure you website directories 'everyone' permission, READ should be good enough. This is a start. If that does not work we can try more. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 1:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 9 17:46:58 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:46:58 -0400 Subject: [dba-VB] .net assembler Message-ID: Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun May 9 17:53:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:53:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: Message-ID: On the same note, does anyone know how to look at the Microsoft Intermediate Language (PCODE) for the running program? I'd love to see that. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 09, 2004 6:47 PM To: VBA; AccessD Subject: [dba-VB] .net assembler Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From phpons at free.fr Mon May 10 05:45:06 2004 From: phpons at free.fr (Philippe Pons) Date: Mon, 10 May 2004 12:45:06 +0200 Subject: [dba-VB] .net assembler References: Message-ID: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Mon May 10 06:27:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Mon, 10 May 2004 07:27:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Message-ID: Cool, thanks. Just idle curiosity as to what it looks like. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Philippe Pons Sent: Monday, May 10, 2004 6:45 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] .net assembler Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From AdamB at peabody.org.uk Thu May 13 08:10:47 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:10:47 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. Cheers Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From sgsax at ksu.edu Thu May 13 08:19:48 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Thu, 13 May 2004 08:19:48 -0500 Subject: [dba-VB] CreateObject, GetObject Functions In-Reply-To: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> References: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Message-ID: <1084454388.715.1.camel@sgsax-th4022.ksu.edu> Adam, If you try to run a GetObject and the object doesn't exist, does it return an error value? If so, you can simply always run GetObject first, and if it returns an error then run CreateObject. Just a thought. Seth On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > Question: > > I am trying to set the value of a Boolean variable on the basis of whether > an instance of Excel is running. In doing this I can then determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > > Cheers > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ##################################################################################### > This e-mail message has been scanned for Viruses and Content and cleared > by MailMarshal > For more information please visit www.marshalsoftware.com > ##################################################################################### > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual to whom it is addressed. Any views or > opinions presented are solely those of the author and do not necessarily > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received this > email in error and that any use, dissemination, forwarding, printing, or > copying of this email is strictly prohibited. If you have received this email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates Total > Virus Defense software's have swept this email message for the presence of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Bryan_Carbonnell at cbc.ca Thu May 13 08:18:38 2004 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Thu, 13 May 2004 09:18:38 -0400 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: Adam, Here is how I deal with this: 'Temporarily disable error handling On Error Resume Next 'Get a reference to an already open session on Excel Set objXL = GetObject(, "Excel.Application") 'Check to see if everything is ok If objXL Is Nothing Then 'Object is nothing, which means Excel is not open Set objXL = CreateObject("Excel.Application") bolWeLoaded = True End If 'Restore proper error handling On Error GoTo cmdExcel_Click_Error Bryan Carbonnell bryan_carbonnell at cbc.ca >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. From AdamB at peabody.org.uk Thu May 13 08:36:59 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:36:59 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5F@NTDATA> Yes indeed it does. I have tried error trapping for the run-time error that a failed GetObject function produces so that when it happens I perform the CreateObject function. But there must be another way of doing it surely? Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Seth Galitzer[SMTP:sgsax at ksu.edu] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:19 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > If you try to run a GetObject and the object doesn't exist, does it > return an error value? If so, you can simply always run GetObject > first, and if it returns an error then run CreateObject. > > Just a thought. > > Seth > > On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > whether > > an instance of Excel is running. In doing this I can then determine > whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > > > Cheers > > > > Adam Borrie > > Systems Manager > > Peabody Trust > > * 0207 021 4439 > > * adamb at peabody.org.uk > > > > > > > ########################################################################## > ########### > > This e-mail message has been scanned for Viruses and Content and cleared > > > by MailMarshal > > For more information please visit www.marshalsoftware.com > > > ########################################################################## > ########### > > > > This email and any files transmitted with it are confidential and > intended > > solely for the use of the individual to whom it is addressed. Any views > or > > opinions presented are solely those of the author and do not necessarily > > > represent those of the Peabody Trust. > > > > If you are not the intended recipient, be advised that you have received > this > > email in error and that any use, dissemination, forwarding, printing, or > > > copying of this email is strictly prohibited. If you have received this > email > > in error please notify the Peabody Trust IT Help Desk either by; > > > > Emailing helpdesk at peabody.org.uk > > > > Or by telephone on 020 79287811 > > > > Peabody Trust - http://www.peabody.org.uk > > > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > > > This footnote also confirms that MailMarshal and Network Associates > Total > > Virus Defense software's have swept this email message for the presence > of > > computer viruses http://www.marshalsoftware.com and http://www.nai.com > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > -- > Seth Galitzer sgsax at ksu.edu > Computing Specialist http://puma.agron.ksu.edu/~sgsax > Dept. of Plant Pathology > Kansas State University > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From AdamB at peabody.org.uk Thu May 13 08:41:42 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:41:42 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E61@NTDATA> Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether > an instance of Excel is running. In doing this I can then determine > whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From bkollodge at parkindustries.com Thu May 13 08:44:44 2004 From: bkollodge at parkindustries.com (bkollodge at parkindustries.com) Date: Thu, 13 May 2004 08:44:44 -0500 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: What would you change "Excel.Application" to if I wanted to see if MyVBApp.exe was already running? Thanks, Bill -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie Sent: May 13, 2004 8:42 To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] CreateObject, GetObject Functions Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether an instance of Excel is running. In doing this I can then > determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ######################################################################## ############# This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ######################################################################## ############# This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This Communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of the e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. This e-mail does not constitute consent to the use of the sender's contact information for direct marketing purposes or for transfers of data to third parties. From AdamB at peabody.org.uk Thu May 13 08:54:12 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:54:12 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E66@NTDATA> there is a PrevInstance property. Rather than me explain it, check out the online Help, it will make more sense than have me try to explain it. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: > bkollodge at parkindustries.com[SMTP:bkollodge at parkindustries.com] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:44 > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > What would you change "Excel.Application" to if I wanted to see if > MyVBApp.exe was already running? > > Thanks, > Bill > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie > Sent: May 13, 2004 8:42 > To: 'dba-vb at databaseadvisors.com' > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > > Bryan you're a star! > > I had just come to the conclusion that I would have to error trap it, so > thanks for the code. > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ---------- > > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > > Reply To: dba-vb at databaseadvisors.com > > Sent: 13 May 2004 14:18 > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > > > Adam, > > > > Here is how I deal with this: > > > > 'Temporarily disable error handling > > On Error Resume Next > > 'Get a reference to an already open session on Excel > > Set objXL = GetObject(, "Excel.Application") > > 'Check to see if everything is ok > > If objXL Is Nothing Then > > 'Object is nothing, which means Excel is not open > > Set objXL = CreateObject("Excel.Application") > > bolWeLoaded = True > > End If > > > > 'Restore proper error handling > > On Error GoTo cmdExcel_Click_Error > > > > > > Bryan Carbonnell > > bryan_carbonnell at cbc.ca > > > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > > whether an instance of Excel is running. In doing this I can then > > determine whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > ######################################################################## > ############# > This e-mail message has been scanned for Viruses and Content and cleared > > by MailMarshal > For more information please visit www.marshalsoftware.com > ######################################################################## > ############# > > This email and any files transmitted with it are confidential and > intended solely for the use of the individual to whom it is addressed. > Any views or > opinions presented are solely those of the author and do not necessarily > > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received > this > email in error and that any use, dissemination, forwarding, printing, or > > copying of this email is strictly prohibited. If you have received this > email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates > Total > Virus Defense software's have swept this email message for the presence > of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > This Communication is for use by the intended recipient and contains > information that may be privileged, confidential or copyrighted under > applicable law. If you are not the intended recipient, you are hereby > formally notified that any use, copying or distribution of the e-mail, in > whole or in part, is strictly prohibited. Please notify the sender by > return e-mail and delete this e-mail from your system. This e-mail does > not constitute consent to the use of the sender's contact information for > direct marketing purposes or for transfers of data to third parties. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From JRojas at tnco-inc.com Wed May 19 13:04:27 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Wed, 19 May 2004 14:04:27 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE3@mercury.tnco-inc.com> Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From BBarabash at TappeConstruction.com Wed May 19 15:02:48 2004 From: BBarabash at TappeConstruction.com (Brett Barabash) Date: Wed, 19 May 2004 15:02:48 -0500 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <426071E0B0A6D311B3C0006008B0AB23AFE5ED@TAPPEEXCH01> My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------------------------------------------------------------------------------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. From JRojas at tnco-inc.com Thu May 20 08:12:05 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 20 May 2004 09:12:05 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE5@mercury.tnco-inc.com> Thanks for the links. I guess MS released a VB.Net Resource Kit that includes a component that adds serial communication functionality. http://msdn.microsoft.com/vbasic/vbrkit/ JR -----Original Message----- From: Brett Barabash [mailto:BBarabash at tappeconstruction.com] Sent: Wednesday, May 19, 2004 4:03 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net - Serial port communications My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------------------------------- ---------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From mikedorism at adelphia.net Thu May 27 10:47:54 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Thu, 27 May 2004 11:47:54 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report Message-ID: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net From accessd at shaw.ca Thu May 27 19:42:19 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 27 May 2004 17:42:19 -0700 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> Message-ID: Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From mikedorism at adelphia.net Fri May 28 06:03:32 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Fri, 28 May 2004 07:03:32 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: Message-ID: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> I'm looking to change the height and width of the image container appropriately so that the picture doesn't get distorted -- not the size of the file itself. I know how to get the height and width of the image file. Just don't know what to do with that information. I obviously need to convert it to twips but what formula would I use? Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence (AccessD) Sent: Thursday, May 27, 2004 8:42 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From sgsax at ksu.edu Fri May 28 07:29:33 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Fri, 28 May 2004 07:29:33 -0500 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> References: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> Message-ID: <1085747373.8092.4.camel@sgsax-th4022.ksu.edu> Doris, In general, 1440 twips = 1 inch. So if you know the dimensions of your image in inches, you can use this. However, if you know the dimensions of your image in pixels, then you need to convert pixels to twips using some API coding I found this in the MS KB which should help you get going: "ACC: How to Convert Twips to Pixels" http://support.microsoft.com/default.aspx?scid=kb;en-us;Q94927 Enjoy! Seth On Fri, 2004-05-28 at 06:03, Mike & Doris Manning wrote: > I'm looking to change the height and width of the image container > appropriately so that the picture doesn't get distorted -- not the size of > the file itself. I know how to get the height and width of the image file. > Just don't know what to do with that information. I obviously need to > convert it to twips but what formula would I use? > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Thursday, May 27, 2004 8:42 PM > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report > > > Can I assume that when you say size you mean size not height and width not > size like in capacity (ie. 120K). The first one is easy to do setting a > fixed image container on the report. To actually change the size of the > file, automatically, would require access to various dlls or scripts files > from a packages like Adobe Photoshop or Corel Painter but the result may not > be what you expect or need. > > HTH > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris > Manning > Sent: Thursday, May 27, 2004 8:48 AM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Dynamically resizing an image on a Crystal Report > > > VB.NET > Crystal Reports 10 > SQL Server 2000 > > I have a dataset that gets a dynamic image from a network location and > displays it on a Crystal Report. My problem is that the size of the image > files will vary and I need to resize the blob field on the report. > > Would anyone happen to have code for how to dynamically resize a blob field > on a Crystal Report at runtime? > > Mike and Doris Manning > mikedorism at adelphia.net > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From jwcolby at colbyconsulting.com Sun May 2 09:53:27 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 10:53:27 -0400 Subject: [dba-VB] VB.Net Message-ID: I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com From mikedorism at adelphia.net Sun May 2 13:48:37 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Sun, 2 May 2004 14:48:37 -0400 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: <000001c43076$14a5c960$cc0aa845@hargrove.internal> VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 2 16:27:19 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 17:27:19 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <000001c43076$14a5c960$cc0aa845@hargrove.internal> Message-ID: yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at afsweb.com Sun May 2 11:24:06 2004 From: ebarro at afsweb.com (Eric Barro) Date: Sun, 2 May 2004 09:24:06 -0700 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: John, Here's the "equivalent" code snippet for .NET Sub GetData(CommandText as string) 'we use the sqldata reader; for ms access use OleDBDataReader which has the same properties and syntax Dim myData As SQLDataReader 'this is the corresponding connection object Dim myConnection As New SqlConnection(ConnectionString) 'this is the corresponding command object Dim myCommand As New SqlCommand(CommandText, myConnection) myConnection.Open() 'this is the corresponding rst.open statement myData = myCommand.ExecuteReader() 'this is the corresponding do while not rst.eof statement While myData.Read() 'and this is where we grab the recordset values and assign to form controls or variables myFormField.text = myData("myFieldName") End While End Sub --- Eric Barro Senior Systems Analyst Advanced Field Services (208) 772-7060 http://www.afsweb.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 7:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 From Jdemarco at hudsonhealthplan.org Sun May 2 21:03:05 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Sun, 2 May 2004 22:03:05 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jwcolby at colbyconsulting.com Sun May 2 21:47:16 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 22:47:16 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> Message-ID: Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Mon May 3 09:07:14 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Mon, 3 May 2004 10:07:14 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE872@TTNEXCHSRV1.hshhp.com> Yes that's fairly common code. Jim D. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 10:47 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From paul.hartland at fsmail.net Thu May 6 03:12:09 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 10:12:09 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <1133992.1083831129696.JavaMail.www@wwinf3001> To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From mark at markkaren.com Thu May 6 07:42:27 2004 From: mark at markkaren.com (Mark Rider) Date: Thu, 6 May 2004 07:42:27 -0500 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: <200405061242.i46CgqQ01290@databaseadvisors.com> Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Thu May 6 08:30:50 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 15:30:50 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <15110875.1083850250229.JavaMail.www@wwinf3002> Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. Thanks for all your help. Message date : May 06 2004, 01:54 PM >From : "Mark Rider" To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com Copy to : Subject : RE: [dba-VB] OT - HTML & ASP Help Required Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge & Co. Internet Reporting System Enter Username & Password Below Username: Password: NAME="Submit" VALUE="Submit"> checklogin.asp code is below: Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From martyconnelly at shaw.ca Thu May 6 15:04:07 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 06 May 2004 13:04:07 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required References: <15110875.1083850250229.JavaMail.www@wwinf3002> Message-ID: <409A9A37.5030600@shaw.ca> Charles Carrol's site is good for info http://www.learnasp.com/learn/index.asp I think his ASP mail lists moved here http://aspadvice.com/login.aspx?ReturnUrl=%2fsignup%2flist.aspx or http://www.genericdb.com One thing that will save you time switching from home to work and use relative path addressing Use Server.MapPath() whenever referring to files stored locally on the server instead of a static path (except in the rare occasions where it's necessary). dbConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.Mappath("/mywebfolder/") & "\myfolder\edge.mdb;" paul.hartland at fsmail.net wrote: >Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. >Thanks for all your help. > > > > > >Message date : May 06 2004, 01:54 PM >>From : "Mark Rider" >To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com >Copy to : >Subject : RE: [dba-VB] OT - HTML & ASP Help Required >Not sure of the exact problem, but it appears to be something with accessing >the IIS at work. It sounds like you are pointing to the files themselves >rather than the IIS Server. The way to get to the pages should be something >like : >http://OfficeIIS_Server/default.htm > >If you are simply trying to open the page through File | Open you are not >actually going thru the IIS Server, and the Download message will appear. > >Hope this helps! > >Mark Rider > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of >paul.hartland at fsmail.net >Sent: Thursday, May 06, 2004 3:12 AM >To: dba-vb >Subject: [dba-VB] OT - HTML & ASP Help Required > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a Windows >2000 server with IIS installed in the C:\Inetpub\wwwroot directory along >with the ASP code which is saved as checklogin.asp in the same directory. >On my Windows 98 machine at home with Personal Web Server (PWS) installed it >runs fine, however when trying to run it on our server in the office it just >displays the ASP code when the checklogin.asl page is called, and if you try >it from a desktop it comes up with a you are about to download >checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP >etc. > >default.htm code below: > > > > > > > > >Orridge & Co. Internet >Reporting System > > >Enter Username & >Password Below > > > > > > >Username: > > > >Password: > > > > NAME="Submit" VALUE="Submit"> > > > > > > > > > > > > >checklogin.asp code is below: > > > > > > >Thanks in advance for any help. > >Paul Hartland > >-- > >Whatever you Wanadoo: >http://www.wanadoo.co.uk/time/ > >This email has been checked for most known viruses - find out more at: >http://www.wanadoo.co.uk/help/id/7098.htm >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada From accessd at shaw.ca Thu May 6 20:13:02 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 06 May 2004 18:13:02 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: Hi Paul: There are a whole wack of issues that may not allow your code to run. The first thing to do is to make sure that have your virtual site set up. 1. This is done through your IIS, 'Default Web Site'. (This is your base site template.) 2. Go to the 'Home directory' tab, Configuration button, application mapping and make sure the '.asp' extension is mapped. Assuming that the '.asp' extension is displayed and the appropriate 'asp.dll' is there...you can check the directories to be overly careful. 3. Double click, to see if all HTML processes are activated 'POST,GET, etc...'. 4. Then the 'Application' Option tab and make sure VBScript is the default. (Not necessary but let's keep things simple.) 5. On the 'Home Directory' tab, make sure that the 'Execute Permission' has 'Script Only' selected, at least. 6. On your 'Documents' tab, if you are starting your website, running an asp file, you have to add something like 'index.asp' or 'default.asp'. (This is only done if you do not want have to key in the start file (index.asp) every time.) 7. If you are not logging into the server through a networked station, in order to run a locally stored web page, you have to access it like: 'http://localhost/MyWebSiteDirectory/index.asp'. (Note if you are accessing the web site, on your server, from your network station, use something like: http://192.168.123.1/MyWebDirectory/index.asp. 8. Make sure you website directories 'everyone' permission, READ should be good enough. This is a start. If that does not work we can try more. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 1:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 9 17:46:58 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:46:58 -0400 Subject: [dba-VB] .net assembler Message-ID: Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun May 9 17:53:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:53:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: Message-ID: On the same note, does anyone know how to look at the Microsoft Intermediate Language (PCODE) for the running program? I'd love to see that. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 09, 2004 6:47 PM To: VBA; AccessD Subject: [dba-VB] .net assembler Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From phpons at free.fr Mon May 10 05:45:06 2004 From: phpons at free.fr (Philippe Pons) Date: Mon, 10 May 2004 12:45:06 +0200 Subject: [dba-VB] .net assembler References: Message-ID: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Mon May 10 06:27:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Mon, 10 May 2004 07:27:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Message-ID: Cool, thanks. Just idle curiosity as to what it looks like. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Philippe Pons Sent: Monday, May 10, 2004 6:45 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] .net assembler Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From AdamB at peabody.org.uk Thu May 13 08:10:47 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:10:47 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. Cheers Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From sgsax at ksu.edu Thu May 13 08:19:48 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Thu, 13 May 2004 08:19:48 -0500 Subject: [dba-VB] CreateObject, GetObject Functions In-Reply-To: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> References: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Message-ID: <1084454388.715.1.camel@sgsax-th4022.ksu.edu> Adam, If you try to run a GetObject and the object doesn't exist, does it return an error value? If so, you can simply always run GetObject first, and if it returns an error then run CreateObject. Just a thought. Seth On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > Question: > > I am trying to set the value of a Boolean variable on the basis of whether > an instance of Excel is running. In doing this I can then determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > > Cheers > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ##################################################################################### > This e-mail message has been scanned for Viruses and Content and cleared > by MailMarshal > For more information please visit www.marshalsoftware.com > ##################################################################################### > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual to whom it is addressed. Any views or > opinions presented are solely those of the author and do not necessarily > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received this > email in error and that any use, dissemination, forwarding, printing, or > copying of this email is strictly prohibited. If you have received this email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates Total > Virus Defense software's have swept this email message for the presence of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Bryan_Carbonnell at cbc.ca Thu May 13 08:18:38 2004 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Thu, 13 May 2004 09:18:38 -0400 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: Adam, Here is how I deal with this: 'Temporarily disable error handling On Error Resume Next 'Get a reference to an already open session on Excel Set objXL = GetObject(, "Excel.Application") 'Check to see if everything is ok If objXL Is Nothing Then 'Object is nothing, which means Excel is not open Set objXL = CreateObject("Excel.Application") bolWeLoaded = True End If 'Restore proper error handling On Error GoTo cmdExcel_Click_Error Bryan Carbonnell bryan_carbonnell at cbc.ca >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. From AdamB at peabody.org.uk Thu May 13 08:36:59 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:36:59 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5F@NTDATA> Yes indeed it does. I have tried error trapping for the run-time error that a failed GetObject function produces so that when it happens I perform the CreateObject function. But there must be another way of doing it surely? Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Seth Galitzer[SMTP:sgsax at ksu.edu] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:19 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > If you try to run a GetObject and the object doesn't exist, does it > return an error value? If so, you can simply always run GetObject > first, and if it returns an error then run CreateObject. > > Just a thought. > > Seth > > On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > whether > > an instance of Excel is running. In doing this I can then determine > whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > > > Cheers > > > > Adam Borrie > > Systems Manager > > Peabody Trust > > * 0207 021 4439 > > * adamb at peabody.org.uk > > > > > > > ########################################################################## > ########### > > This e-mail message has been scanned for Viruses and Content and cleared > > > by MailMarshal > > For more information please visit www.marshalsoftware.com > > > ########################################################################## > ########### > > > > This email and any files transmitted with it are confidential and > intended > > solely for the use of the individual to whom it is addressed. Any views > or > > opinions presented are solely those of the author and do not necessarily > > > represent those of the Peabody Trust. > > > > If you are not the intended recipient, be advised that you have received > this > > email in error and that any use, dissemination, forwarding, printing, or > > > copying of this email is strictly prohibited. If you have received this > email > > in error please notify the Peabody Trust IT Help Desk either by; > > > > Emailing helpdesk at peabody.org.uk > > > > Or by telephone on 020 79287811 > > > > Peabody Trust - http://www.peabody.org.uk > > > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > > > This footnote also confirms that MailMarshal and Network Associates > Total > > Virus Defense software's have swept this email message for the presence > of > > computer viruses http://www.marshalsoftware.com and http://www.nai.com > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > -- > Seth Galitzer sgsax at ksu.edu > Computing Specialist http://puma.agron.ksu.edu/~sgsax > Dept. of Plant Pathology > Kansas State University > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From AdamB at peabody.org.uk Thu May 13 08:41:42 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:41:42 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E61@NTDATA> Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether > an instance of Excel is running. In doing this I can then determine > whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From bkollodge at parkindustries.com Thu May 13 08:44:44 2004 From: bkollodge at parkindustries.com (bkollodge at parkindustries.com) Date: Thu, 13 May 2004 08:44:44 -0500 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: What would you change "Excel.Application" to if I wanted to see if MyVBApp.exe was already running? Thanks, Bill -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie Sent: May 13, 2004 8:42 To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] CreateObject, GetObject Functions Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether an instance of Excel is running. In doing this I can then > determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ######################################################################## ############# This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ######################################################################## ############# This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This Communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of the e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. This e-mail does not constitute consent to the use of the sender's contact information for direct marketing purposes or for transfers of data to third parties. From AdamB at peabody.org.uk Thu May 13 08:54:12 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:54:12 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E66@NTDATA> there is a PrevInstance property. Rather than me explain it, check out the online Help, it will make more sense than have me try to explain it. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: > bkollodge at parkindustries.com[SMTP:bkollodge at parkindustries.com] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:44 > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > What would you change "Excel.Application" to if I wanted to see if > MyVBApp.exe was already running? > > Thanks, > Bill > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie > Sent: May 13, 2004 8:42 > To: 'dba-vb at databaseadvisors.com' > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > > Bryan you're a star! > > I had just come to the conclusion that I would have to error trap it, so > thanks for the code. > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ---------- > > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > > Reply To: dba-vb at databaseadvisors.com > > Sent: 13 May 2004 14:18 > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > > > Adam, > > > > Here is how I deal with this: > > > > 'Temporarily disable error handling > > On Error Resume Next > > 'Get a reference to an already open session on Excel > > Set objXL = GetObject(, "Excel.Application") > > 'Check to see if everything is ok > > If objXL Is Nothing Then > > 'Object is nothing, which means Excel is not open > > Set objXL = CreateObject("Excel.Application") > > bolWeLoaded = True > > End If > > > > 'Restore proper error handling > > On Error GoTo cmdExcel_Click_Error > > > > > > Bryan Carbonnell > > bryan_carbonnell at cbc.ca > > > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > > whether an instance of Excel is running. In doing this I can then > > determine whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > ######################################################################## > ############# > This e-mail message has been scanned for Viruses and Content and cleared > > by MailMarshal > For more information please visit www.marshalsoftware.com > ######################################################################## > ############# > > This email and any files transmitted with it are confidential and > intended solely for the use of the individual to whom it is addressed. > Any views or > opinions presented are solely those of the author and do not necessarily > > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received > this > email in error and that any use, dissemination, forwarding, printing, or > > copying of this email is strictly prohibited. If you have received this > email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates > Total > Virus Defense software's have swept this email message for the presence > of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > This Communication is for use by the intended recipient and contains > information that may be privileged, confidential or copyrighted under > applicable law. If you are not the intended recipient, you are hereby > formally notified that any use, copying or distribution of the e-mail, in > whole or in part, is strictly prohibited. Please notify the sender by > return e-mail and delete this e-mail from your system. This e-mail does > not constitute consent to the use of the sender's contact information for > direct marketing purposes or for transfers of data to third parties. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From JRojas at tnco-inc.com Wed May 19 13:04:27 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Wed, 19 May 2004 14:04:27 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE3@mercury.tnco-inc.com> Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From BBarabash at TappeConstruction.com Wed May 19 15:02:48 2004 From: BBarabash at TappeConstruction.com (Brett Barabash) Date: Wed, 19 May 2004 15:02:48 -0500 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <426071E0B0A6D311B3C0006008B0AB23AFE5ED@TAPPEEXCH01> My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------------------------------------------------------------------------------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. From JRojas at tnco-inc.com Thu May 20 08:12:05 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 20 May 2004 09:12:05 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE5@mercury.tnco-inc.com> Thanks for the links. I guess MS released a VB.Net Resource Kit that includes a component that adds serial communication functionality. http://msdn.microsoft.com/vbasic/vbrkit/ JR -----Original Message----- From: Brett Barabash [mailto:BBarabash at tappeconstruction.com] Sent: Wednesday, May 19, 2004 4:03 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net - Serial port communications My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------------------------------- ---------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From mikedorism at adelphia.net Thu May 27 10:47:54 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Thu, 27 May 2004 11:47:54 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report Message-ID: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net From accessd at shaw.ca Thu May 27 19:42:19 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 27 May 2004 17:42:19 -0700 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> Message-ID: Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From mikedorism at adelphia.net Fri May 28 06:03:32 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Fri, 28 May 2004 07:03:32 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: Message-ID: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> I'm looking to change the height and width of the image container appropriately so that the picture doesn't get distorted -- not the size of the file itself. I know how to get the height and width of the image file. Just don't know what to do with that information. I obviously need to convert it to twips but what formula would I use? Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence (AccessD) Sent: Thursday, May 27, 2004 8:42 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From sgsax at ksu.edu Fri May 28 07:29:33 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Fri, 28 May 2004 07:29:33 -0500 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> References: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> Message-ID: <1085747373.8092.4.camel@sgsax-th4022.ksu.edu> Doris, In general, 1440 twips = 1 inch. So if you know the dimensions of your image in inches, you can use this. However, if you know the dimensions of your image in pixels, then you need to convert pixels to twips using some API coding I found this in the MS KB which should help you get going: "ACC: How to Convert Twips to Pixels" http://support.microsoft.com/default.aspx?scid=kb;en-us;Q94927 Enjoy! Seth On Fri, 2004-05-28 at 06:03, Mike & Doris Manning wrote: > I'm looking to change the height and width of the image container > appropriately so that the picture doesn't get distorted -- not the size of > the file itself. I know how to get the height and width of the image file. > Just don't know what to do with that information. I obviously need to > convert it to twips but what formula would I use? > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Thursday, May 27, 2004 8:42 PM > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report > > > Can I assume that when you say size you mean size not height and width not > size like in capacity (ie. 120K). The first one is easy to do setting a > fixed image container on the report. To actually change the size of the > file, automatically, would require access to various dlls or scripts files > from a packages like Adobe Photoshop or Corel Painter but the result may not > be what you expect or need. > > HTH > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris > Manning > Sent: Thursday, May 27, 2004 8:48 AM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Dynamically resizing an image on a Crystal Report > > > VB.NET > Crystal Reports 10 > SQL Server 2000 > > I have a dataset that gets a dynamic image from a network location and > displays it on a Crystal Report. My problem is that the size of the image > files will vary and I need to resize the blob field on the report. > > Would anyone happen to have code for how to dynamically resize a blob field > on a Crystal Report at runtime? > > Mike and Doris Manning > mikedorism at adelphia.net > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From jwcolby at colbyconsulting.com Sun May 2 09:53:27 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 10:53:27 -0400 Subject: [dba-VB] VB.Net Message-ID: I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com From mikedorism at adelphia.net Sun May 2 13:48:37 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Sun, 2 May 2004 14:48:37 -0400 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: <000001c43076$14a5c960$cc0aa845@hargrove.internal> VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 2 16:27:19 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 17:27:19 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <000001c43076$14a5c960$cc0aa845@hargrove.internal> Message-ID: yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at afsweb.com Sun May 2 11:24:06 2004 From: ebarro at afsweb.com (Eric Barro) Date: Sun, 2 May 2004 09:24:06 -0700 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: John, Here's the "equivalent" code snippet for .NET Sub GetData(CommandText as string) 'we use the sqldata reader; for ms access use OleDBDataReader which has the same properties and syntax Dim myData As SQLDataReader 'this is the corresponding connection object Dim myConnection As New SqlConnection(ConnectionString) 'this is the corresponding command object Dim myCommand As New SqlCommand(CommandText, myConnection) myConnection.Open() 'this is the corresponding rst.open statement myData = myCommand.ExecuteReader() 'this is the corresponding do while not rst.eof statement While myData.Read() 'and this is where we grab the recordset values and assign to form controls or variables myFormField.text = myData("myFieldName") End While End Sub --- Eric Barro Senior Systems Analyst Advanced Field Services (208) 772-7060 http://www.afsweb.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 7:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 From Jdemarco at hudsonhealthplan.org Sun May 2 21:03:05 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Sun, 2 May 2004 22:03:05 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jwcolby at colbyconsulting.com Sun May 2 21:47:16 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 22:47:16 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> Message-ID: Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Mon May 3 09:07:14 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Mon, 3 May 2004 10:07:14 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE872@TTNEXCHSRV1.hshhp.com> Yes that's fairly common code. Jim D. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 10:47 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From paul.hartland at fsmail.net Thu May 6 03:12:09 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 10:12:09 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <1133992.1083831129696.JavaMail.www@wwinf3001> To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From mark at markkaren.com Thu May 6 07:42:27 2004 From: mark at markkaren.com (Mark Rider) Date: Thu, 6 May 2004 07:42:27 -0500 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: <200405061242.i46CgqQ01290@databaseadvisors.com> Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Thu May 6 08:30:50 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 15:30:50 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <15110875.1083850250229.JavaMail.www@wwinf3002> Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. Thanks for all your help. Message date : May 06 2004, 01:54 PM >From : "Mark Rider" To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com Copy to : Subject : RE: [dba-VB] OT - HTML & ASP Help Required Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge & Co. Internet Reporting System Enter Username & Password Below Username: Password: NAME="Submit" VALUE="Submit"> checklogin.asp code is below: Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From martyconnelly at shaw.ca Thu May 6 15:04:07 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 06 May 2004 13:04:07 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required References: <15110875.1083850250229.JavaMail.www@wwinf3002> Message-ID: <409A9A37.5030600@shaw.ca> Charles Carrol's site is good for info http://www.learnasp.com/learn/index.asp I think his ASP mail lists moved here http://aspadvice.com/login.aspx?ReturnUrl=%2fsignup%2flist.aspx or http://www.genericdb.com One thing that will save you time switching from home to work and use relative path addressing Use Server.MapPath() whenever referring to files stored locally on the server instead of a static path (except in the rare occasions where it's necessary). dbConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.Mappath("/mywebfolder/") & "\myfolder\edge.mdb;" paul.hartland at fsmail.net wrote: >Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. >Thanks for all your help. > > > > > >Message date : May 06 2004, 01:54 PM >>From : "Mark Rider" >To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com >Copy to : >Subject : RE: [dba-VB] OT - HTML & ASP Help Required >Not sure of the exact problem, but it appears to be something with accessing >the IIS at work. It sounds like you are pointing to the files themselves >rather than the IIS Server. The way to get to the pages should be something >like : >http://OfficeIIS_Server/default.htm > >If you are simply trying to open the page through File | Open you are not >actually going thru the IIS Server, and the Download message will appear. > >Hope this helps! > >Mark Rider > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of >paul.hartland at fsmail.net >Sent: Thursday, May 06, 2004 3:12 AM >To: dba-vb >Subject: [dba-VB] OT - HTML & ASP Help Required > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a Windows >2000 server with IIS installed in the C:\Inetpub\wwwroot directory along >with the ASP code which is saved as checklogin.asp in the same directory. >On my Windows 98 machine at home with Personal Web Server (PWS) installed it >runs fine, however when trying to run it on our server in the office it just >displays the ASP code when the checklogin.asl page is called, and if you try >it from a desktop it comes up with a you are about to download >checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP >etc. > >default.htm code below: > > > > > > > > >Orridge & Co. Internet >Reporting System > > >Enter Username & >Password Below > > > > > > >Username: > > > >Password: > > > > NAME="Submit" VALUE="Submit"> > > > > > > > > > > > > >checklogin.asp code is below: > > > > > > >Thanks in advance for any help. > >Paul Hartland > >-- > >Whatever you Wanadoo: >http://www.wanadoo.co.uk/time/ > >This email has been checked for most known viruses - find out more at: >http://www.wanadoo.co.uk/help/id/7098.htm >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada From accessd at shaw.ca Thu May 6 20:13:02 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 06 May 2004 18:13:02 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: Hi Paul: There are a whole wack of issues that may not allow your code to run. The first thing to do is to make sure that have your virtual site set up. 1. This is done through your IIS, 'Default Web Site'. (This is your base site template.) 2. Go to the 'Home directory' tab, Configuration button, application mapping and make sure the '.asp' extension is mapped. Assuming that the '.asp' extension is displayed and the appropriate 'asp.dll' is there...you can check the directories to be overly careful. 3. Double click, to see if all HTML processes are activated 'POST,GET, etc...'. 4. Then the 'Application' Option tab and make sure VBScript is the default. (Not necessary but let's keep things simple.) 5. On the 'Home Directory' tab, make sure that the 'Execute Permission' has 'Script Only' selected, at least. 6. On your 'Documents' tab, if you are starting your website, running an asp file, you have to add something like 'index.asp' or 'default.asp'. (This is only done if you do not want have to key in the start file (index.asp) every time.) 7. If you are not logging into the server through a networked station, in order to run a locally stored web page, you have to access it like: 'http://localhost/MyWebSiteDirectory/index.asp'. (Note if you are accessing the web site, on your server, from your network station, use something like: http://192.168.123.1/MyWebDirectory/index.asp. 8. Make sure you website directories 'everyone' permission, READ should be good enough. This is a start. If that does not work we can try more. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 1:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 9 17:46:58 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:46:58 -0400 Subject: [dba-VB] .net assembler Message-ID: Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun May 9 17:53:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:53:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: Message-ID: On the same note, does anyone know how to look at the Microsoft Intermediate Language (PCODE) for the running program? I'd love to see that. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 09, 2004 6:47 PM To: VBA; AccessD Subject: [dba-VB] .net assembler Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From phpons at free.fr Mon May 10 05:45:06 2004 From: phpons at free.fr (Philippe Pons) Date: Mon, 10 May 2004 12:45:06 +0200 Subject: [dba-VB] .net assembler References: Message-ID: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Mon May 10 06:27:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Mon, 10 May 2004 07:27:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Message-ID: Cool, thanks. Just idle curiosity as to what it looks like. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Philippe Pons Sent: Monday, May 10, 2004 6:45 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] .net assembler Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From AdamB at peabody.org.uk Thu May 13 08:10:47 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:10:47 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. Cheers Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From sgsax at ksu.edu Thu May 13 08:19:48 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Thu, 13 May 2004 08:19:48 -0500 Subject: [dba-VB] CreateObject, GetObject Functions In-Reply-To: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> References: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Message-ID: <1084454388.715.1.camel@sgsax-th4022.ksu.edu> Adam, If you try to run a GetObject and the object doesn't exist, does it return an error value? If so, you can simply always run GetObject first, and if it returns an error then run CreateObject. Just a thought. Seth On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > Question: > > I am trying to set the value of a Boolean variable on the basis of whether > an instance of Excel is running. In doing this I can then determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > > Cheers > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ##################################################################################### > This e-mail message has been scanned for Viruses and Content and cleared > by MailMarshal > For more information please visit www.marshalsoftware.com > ##################################################################################### > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual to whom it is addressed. Any views or > opinions presented are solely those of the author and do not necessarily > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received this > email in error and that any use, dissemination, forwarding, printing, or > copying of this email is strictly prohibited. If you have received this email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates Total > Virus Defense software's have swept this email message for the presence of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Bryan_Carbonnell at cbc.ca Thu May 13 08:18:38 2004 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Thu, 13 May 2004 09:18:38 -0400 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: Adam, Here is how I deal with this: 'Temporarily disable error handling On Error Resume Next 'Get a reference to an already open session on Excel Set objXL = GetObject(, "Excel.Application") 'Check to see if everything is ok If objXL Is Nothing Then 'Object is nothing, which means Excel is not open Set objXL = CreateObject("Excel.Application") bolWeLoaded = True End If 'Restore proper error handling On Error GoTo cmdExcel_Click_Error Bryan Carbonnell bryan_carbonnell at cbc.ca >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. From AdamB at peabody.org.uk Thu May 13 08:36:59 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:36:59 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5F@NTDATA> Yes indeed it does. I have tried error trapping for the run-time error that a failed GetObject function produces so that when it happens I perform the CreateObject function. But there must be another way of doing it surely? Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Seth Galitzer[SMTP:sgsax at ksu.edu] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:19 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > If you try to run a GetObject and the object doesn't exist, does it > return an error value? If so, you can simply always run GetObject > first, and if it returns an error then run CreateObject. > > Just a thought. > > Seth > > On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > whether > > an instance of Excel is running. In doing this I can then determine > whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > > > Cheers > > > > Adam Borrie > > Systems Manager > > Peabody Trust > > * 0207 021 4439 > > * adamb at peabody.org.uk > > > > > > > ########################################################################## > ########### > > This e-mail message has been scanned for Viruses and Content and cleared > > > by MailMarshal > > For more information please visit www.marshalsoftware.com > > > ########################################################################## > ########### > > > > This email and any files transmitted with it are confidential and > intended > > solely for the use of the individual to whom it is addressed. Any views > or > > opinions presented are solely those of the author and do not necessarily > > > represent those of the Peabody Trust. > > > > If you are not the intended recipient, be advised that you have received > this > > email in error and that any use, dissemination, forwarding, printing, or > > > copying of this email is strictly prohibited. If you have received this > email > > in error please notify the Peabody Trust IT Help Desk either by; > > > > Emailing helpdesk at peabody.org.uk > > > > Or by telephone on 020 79287811 > > > > Peabody Trust - http://www.peabody.org.uk > > > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > > > This footnote also confirms that MailMarshal and Network Associates > Total > > Virus Defense software's have swept this email message for the presence > of > > computer viruses http://www.marshalsoftware.com and http://www.nai.com > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > -- > Seth Galitzer sgsax at ksu.edu > Computing Specialist http://puma.agron.ksu.edu/~sgsax > Dept. of Plant Pathology > Kansas State University > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From AdamB at peabody.org.uk Thu May 13 08:41:42 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:41:42 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E61@NTDATA> Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether > an instance of Excel is running. In doing this I can then determine > whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From bkollodge at parkindustries.com Thu May 13 08:44:44 2004 From: bkollodge at parkindustries.com (bkollodge at parkindustries.com) Date: Thu, 13 May 2004 08:44:44 -0500 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: What would you change "Excel.Application" to if I wanted to see if MyVBApp.exe was already running? Thanks, Bill -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie Sent: May 13, 2004 8:42 To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] CreateObject, GetObject Functions Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether an instance of Excel is running. In doing this I can then > determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ######################################################################## ############# This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ######################################################################## ############# This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This Communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of the e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. This e-mail does not constitute consent to the use of the sender's contact information for direct marketing purposes or for transfers of data to third parties. From AdamB at peabody.org.uk Thu May 13 08:54:12 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:54:12 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E66@NTDATA> there is a PrevInstance property. Rather than me explain it, check out the online Help, it will make more sense than have me try to explain it. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: > bkollodge at parkindustries.com[SMTP:bkollodge at parkindustries.com] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:44 > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > What would you change "Excel.Application" to if I wanted to see if > MyVBApp.exe was already running? > > Thanks, > Bill > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie > Sent: May 13, 2004 8:42 > To: 'dba-vb at databaseadvisors.com' > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > > Bryan you're a star! > > I had just come to the conclusion that I would have to error trap it, so > thanks for the code. > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ---------- > > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > > Reply To: dba-vb at databaseadvisors.com > > Sent: 13 May 2004 14:18 > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > > > Adam, > > > > Here is how I deal with this: > > > > 'Temporarily disable error handling > > On Error Resume Next > > 'Get a reference to an already open session on Excel > > Set objXL = GetObject(, "Excel.Application") > > 'Check to see if everything is ok > > If objXL Is Nothing Then > > 'Object is nothing, which means Excel is not open > > Set objXL = CreateObject("Excel.Application") > > bolWeLoaded = True > > End If > > > > 'Restore proper error handling > > On Error GoTo cmdExcel_Click_Error > > > > > > Bryan Carbonnell > > bryan_carbonnell at cbc.ca > > > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > > whether an instance of Excel is running. In doing this I can then > > determine whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > ######################################################################## > ############# > This e-mail message has been scanned for Viruses and Content and cleared > > by MailMarshal > For more information please visit www.marshalsoftware.com > ######################################################################## > ############# > > This email and any files transmitted with it are confidential and > intended solely for the use of the individual to whom it is addressed. > Any views or > opinions presented are solely those of the author and do not necessarily > > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received > this > email in error and that any use, dissemination, forwarding, printing, or > > copying of this email is strictly prohibited. If you have received this > email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates > Total > Virus Defense software's have swept this email message for the presence > of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > This Communication is for use by the intended recipient and contains > information that may be privileged, confidential or copyrighted under > applicable law. If you are not the intended recipient, you are hereby > formally notified that any use, copying or distribution of the e-mail, in > whole or in part, is strictly prohibited. Please notify the sender by > return e-mail and delete this e-mail from your system. This e-mail does > not constitute consent to the use of the sender's contact information for > direct marketing purposes or for transfers of data to third parties. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From JRojas at tnco-inc.com Wed May 19 13:04:27 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Wed, 19 May 2004 14:04:27 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE3@mercury.tnco-inc.com> Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From BBarabash at TappeConstruction.com Wed May 19 15:02:48 2004 From: BBarabash at TappeConstruction.com (Brett Barabash) Date: Wed, 19 May 2004 15:02:48 -0500 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <426071E0B0A6D311B3C0006008B0AB23AFE5ED@TAPPEEXCH01> My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------------------------------------------------------------------------------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. From JRojas at tnco-inc.com Thu May 20 08:12:05 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 20 May 2004 09:12:05 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE5@mercury.tnco-inc.com> Thanks for the links. I guess MS released a VB.Net Resource Kit that includes a component that adds serial communication functionality. http://msdn.microsoft.com/vbasic/vbrkit/ JR -----Original Message----- From: Brett Barabash [mailto:BBarabash at tappeconstruction.com] Sent: Wednesday, May 19, 2004 4:03 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net - Serial port communications My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------------------------------- ---------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From mikedorism at adelphia.net Thu May 27 10:47:54 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Thu, 27 May 2004 11:47:54 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report Message-ID: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net From accessd at shaw.ca Thu May 27 19:42:19 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 27 May 2004 17:42:19 -0700 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> Message-ID: Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From mikedorism at adelphia.net Fri May 28 06:03:32 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Fri, 28 May 2004 07:03:32 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: Message-ID: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> I'm looking to change the height and width of the image container appropriately so that the picture doesn't get distorted -- not the size of the file itself. I know how to get the height and width of the image file. Just don't know what to do with that information. I obviously need to convert it to twips but what formula would I use? Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence (AccessD) Sent: Thursday, May 27, 2004 8:42 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From sgsax at ksu.edu Fri May 28 07:29:33 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Fri, 28 May 2004 07:29:33 -0500 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> References: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> Message-ID: <1085747373.8092.4.camel@sgsax-th4022.ksu.edu> Doris, In general, 1440 twips = 1 inch. So if you know the dimensions of your image in inches, you can use this. However, if you know the dimensions of your image in pixels, then you need to convert pixels to twips using some API coding I found this in the MS KB which should help you get going: "ACC: How to Convert Twips to Pixels" http://support.microsoft.com/default.aspx?scid=kb;en-us;Q94927 Enjoy! Seth On Fri, 2004-05-28 at 06:03, Mike & Doris Manning wrote: > I'm looking to change the height and width of the image container > appropriately so that the picture doesn't get distorted -- not the size of > the file itself. I know how to get the height and width of the image file. > Just don't know what to do with that information. I obviously need to > convert it to twips but what formula would I use? > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Thursday, May 27, 2004 8:42 PM > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report > > > Can I assume that when you say size you mean size not height and width not > size like in capacity (ie. 120K). The first one is easy to do setting a > fixed image container on the report. To actually change the size of the > file, automatically, would require access to various dlls or scripts files > from a packages like Adobe Photoshop or Corel Painter but the result may not > be what you expect or need. > > HTH > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris > Manning > Sent: Thursday, May 27, 2004 8:48 AM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Dynamically resizing an image on a Crystal Report > > > VB.NET > Crystal Reports 10 > SQL Server 2000 > > I have a dataset that gets a dynamic image from a network location and > displays it on a Crystal Report. My problem is that the size of the image > files will vary and I need to resize the blob field on the report. > > Would anyone happen to have code for how to dynamically resize a blob field > on a Crystal Report at runtime? > > Mike and Doris Manning > mikedorism at adelphia.net > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From jwcolby at colbyconsulting.com Sun May 2 09:53:27 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 10:53:27 -0400 Subject: [dba-VB] VB.Net Message-ID: I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com From mikedorism at adelphia.net Sun May 2 13:48:37 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Sun, 2 May 2004 14:48:37 -0400 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: <000001c43076$14a5c960$cc0aa845@hargrove.internal> VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 2 16:27:19 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 17:27:19 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <000001c43076$14a5c960$cc0aa845@hargrove.internal> Message-ID: yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From ebarro at afsweb.com Sun May 2 11:24:06 2004 From: ebarro at afsweb.com (Eric Barro) Date: Sun, 2 May 2004 09:24:06 -0700 Subject: [dba-VB] VB.Net In-Reply-To: Message-ID: John, Here's the "equivalent" code snippet for .NET Sub GetData(CommandText as string) 'we use the sqldata reader; for ms access use OleDBDataReader which has the same properties and syntax Dim myData As SQLDataReader 'this is the corresponding connection object Dim myConnection As New SqlConnection(ConnectionString) 'this is the corresponding command object Dim myCommand As New SqlCommand(CommandText, myConnection) myConnection.Open() 'this is the corresponding rst.open statement myData = myCommand.ExecuteReader() 'this is the corresponding do while not rst.eof statement While myData.Read() 'and this is where we grab the recordset values and assign to form controls or variables myFormField.text = myData("myFieldName") End While End Sub --- Eric Barro Senior Systems Analyst Advanced Field Services (208) 772-7060 http://www.afsweb.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 7:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 From Jdemarco at hudsonhealthplan.org Sun May 2 21:03:05 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Sun, 2 May 2004 22:03:05 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From jwcolby at colbyconsulting.com Sun May 2 21:47:16 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 2 May 2004 22:47:16 -0400 Subject: [dba-VB] VB.Net In-Reply-To: <22F1CCD5171D17419CB37FEEE09D5F99030FE870@TTNEXCHSRV1.hshhp.com> Message-ID: Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From Jdemarco at hudsonhealthplan.org Mon May 3 09:07:14 2004 From: Jdemarco at hudsonhealthplan.org (Jim DeMarco) Date: Mon, 3 May 2004 10:07:14 -0400 Subject: [dba-VB] VB.Net Message-ID: <22F1CCD5171D17419CB37FEEE09D5F99030FE872@TTNEXCHSRV1.hshhp.com> Yes that's fairly common code. Jim D. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 10:47 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net Thanks Jim and Eric. In fact I found an entire chapter on the details of this in one of my .net books. Thanks again, John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco Sent: Sunday, May 02, 2004 10:03 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net John, Is this something like what you're looking for? It's some sample code I was playing with in ASP.NET. The connection (g_MyConn) is opened in the OpenConn() function. Other than that it should be pretty straight forward. Also you might add: Imports System.Data.OleDb at the top of your class module. Watch for wrapping and please note this is NOT a complete code sample. Dim sSQL As String Dim sHTML As String Dim cmd As OleDb.OleDbCommand Dim oDataReader As OleDb.OleDbDataReader sSQL = "SELECT MainMenuText, PageParam FROM tblPages WHERE MainMenuItem = True AND Active = True;" OpenConn() Try cmd = New OleDb.OleDbCommand(sSQL, g_MyConn) ' WHERE MainMenuItem = 1 AND Active = True oDataReader = cmd.ExecuteReader(CommandBehavior.Default) sHTML = "
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "
" & vbNewLine While oDataReader.Read sHTML = sHTML.Concat(sHTML, "" & vbNewLine) End While Catch ex As Exception End Try HTH Jim DeMarco Director Application Development Hudson Health Plan -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, May 02, 2004 5:27 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net yea, yea, yea. But you still need dim statements, you still need to set one to refer to the next to the next. Do you ever do this? John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Sunday, May 02, 2004 2:49 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] VB.Net VB.Net uses ADO in which you have a connection and command. You then use a dataset or datareader (forward only/read only) in place of a recordset. How you structure it via code all depends on whether you use OLE, ODBC, or SQLClient ADO providers. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby Sent: Sunday, May 02, 2004 10:53 AM To: VBA Subject: [dba-VB] VB.Net I need to know the syntax for just setting up access to data from code. In DAO you just dimmed a db and a recordset: dim db as dao.database dim rst as dao.database set db = currentdb set rst = db.openrecordset() etc. I know there are three parts to vb.net and can set them up with the wizard, but I want to be able to "just do it" from code as well. Anyone know how? John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com **************************************************************************** ******* "This electronic message is intended to be for the use only of the named rec ipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". **************************************************************************** ******* _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". *********************************************************************************** From paul.hartland at fsmail.net Thu May 6 03:12:09 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 10:12:09 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <1133992.1083831129696.JavaMail.www@wwinf3001> To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From mark at markkaren.com Thu May 6 07:42:27 2004 From: mark at markkaren.com (Mark Rider) Date: Thu, 6 May 2004 07:42:27 -0500 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: <200405061242.i46CgqQ01290@databaseadvisors.com> Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From paul.hartland at fsmail.net Thu May 6 08:30:50 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 6 May 2004 15:30:50 +0200 (CEST) Subject: [dba-VB] OT - HTML & ASP Help Required Message-ID: <15110875.1083850250229.JavaMail.www@wwinf3002> Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. Thanks for all your help. Message date : May 06 2004, 01:54 PM >From : "Mark Rider" To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com Copy to : Subject : RE: [dba-VB] OT - HTML & ASP Help Required Not sure of the exact problem, but it appears to be something with accessing the IIS at work. It sounds like you are pointing to the files themselves rather than the IIS Server. The way to get to the pages should be something like : http://OfficeIIS_Server/default.htm If you are simply trying to open the page through File | Open you are not actually going thru the IIS Server, and the Download message will appear. Hope this helps! Mark Rider -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 3:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge & Co. Internet Reporting System Enter Username & Password Below Username: Password: NAME="Submit" VALUE="Submit"> checklogin.asp code is below: Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm From martyconnelly at shaw.ca Thu May 6 15:04:07 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 06 May 2004 13:04:07 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required References: <15110875.1083850250229.JavaMail.www@wwinf3002> Message-ID: <409A9A37.5030600@shaw.ca> Charles Carrol's site is good for info http://www.learnasp.com/learn/index.asp I think his ASP mail lists moved here http://aspadvice.com/login.aspx?ReturnUrl=%2fsignup%2flist.aspx or http://www.genericdb.com One thing that will save you time switching from home to work and use relative path addressing Use Server.MapPath() whenever referring to files stored locally on the server instead of a static path (except in the rare occasions where it's necessary). dbConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.Mappath("/mywebfolder/") & "\myfolder\edge.mdb;" paul.hartland at fsmail.net wrote: >Yeah, realised that as I clicked the send button....It is really amazing how clicking send on an email can activate the brain. >Thanks for all your help. > > > > > >Message date : May 06 2004, 01:54 PM >>From : "Mark Rider" >To : paul.hartland at fsmail.net, dba-vb at databaseadvisors.com >Copy to : >Subject : RE: [dba-VB] OT - HTML & ASP Help Required >Not sure of the exact problem, but it appears to be something with accessing >the IIS at work. It sounds like you are pointing to the files themselves >rather than the IIS Server. The way to get to the pages should be something >like : >http://OfficeIIS_Server/default.htm > >If you are simply trying to open the page through File | Open you are not >actually going thru the IIS Server, and the Download message will appear. > >Hope this helps! > >Mark Rider > >-----Original Message----- >From: dba-vb-bounces at databaseadvisors.com >[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of >paul.hartland at fsmail.net >Sent: Thursday, May 06, 2004 3:12 AM >To: dba-vb >Subject: [dba-VB] OT - HTML & ASP Help Required > >To all, > >Being a complete novice to HTML & ASP I bought myself a couple of books on >the subjects and have been playing around with a test logon page for our >company. I have the HTML code (as below) saved as default.htm on a Windows >2000 server with IIS installed in the C:\Inetpub\wwwroot directory along >with the ASP code which is saved as checklogin.asp in the same directory. >On my Windows 98 machine at home with Personal Web Server (PWS) installed it >runs fine, however when trying to run it on our server in the office it just >displays the ASP code when the checklogin.asl page is called, and if you try >it from a desktop it comes up with a you are about to download >checklogin.asp page. > >Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP >etc. > >default.htm code below: > > > > > > > > >Orridge & Co. Internet >Reporting System > > >Enter Username & >Password Below > > > > > > >Username: > > > >Password: > > > > NAME="Submit" VALUE="Submit"> > > > > > > > > > > > > >checklogin.asp code is below: > > > > > > >Thanks in advance for any help. > >Paul Hartland > >-- > >Whatever you Wanadoo: >http://www.wanadoo.co.uk/time/ > >This email has been checked for most known viruses - find out more at: >http://www.wanadoo.co.uk/help/id/7098.htm >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada From accessd at shaw.ca Thu May 6 20:13:02 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 06 May 2004 18:13:02 -0700 Subject: [dba-VB] OT - HTML & ASP Help Required In-Reply-To: <1133992.1083831129696.JavaMail.www@wwinf3001> Message-ID: Hi Paul: There are a whole wack of issues that may not allow your code to run. The first thing to do is to make sure that have your virtual site set up. 1. This is done through your IIS, 'Default Web Site'. (This is your base site template.) 2. Go to the 'Home directory' tab, Configuration button, application mapping and make sure the '.asp' extension is mapped. Assuming that the '.asp' extension is displayed and the appropriate 'asp.dll' is there...you can check the directories to be overly careful. 3. Double click, to see if all HTML processes are activated 'POST,GET, etc...'. 4. Then the 'Application' Option tab and make sure VBScript is the default. (Not necessary but let's keep things simple.) 5. On the 'Home Directory' tab, make sure that the 'Execute Permission' has 'Script Only' selected, at least. 6. On your 'Documents' tab, if you are starting your website, running an asp file, you have to add something like 'index.asp' or 'default.asp'. (This is only done if you do not want have to key in the start file (index.asp) every time.) 7. If you are not logging into the server through a networked station, in order to run a locally stored web page, you have to access it like: 'http://localhost/MyWebSiteDirectory/index.asp'. (Note if you are accessing the web site, on your server, from your network station, use something like: http://192.168.123.1/MyWebDirectory/index.asp. 8. Make sure you website directories 'everyone' permission, READ should be good enough. This is a start. If that does not work we can try more. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of paul.hartland at fsmail.net Sent: Thursday, May 06, 2004 1:12 AM To: dba-vb Subject: [dba-VB] OT - HTML & ASP Help Required To all, Being a complete novice to HTML & ASP I bought myself a couple of books on the subjects and have been playing around with a test logon page for our company. I have the HTML code (as below) saved as default.htm on a Windows 2000 server with IIS installed in the C:\Inetpub\wwwroot directory along with the ASP code which is saved as checklogin.asp in the same directory. On my Windows 98 machine at home with Personal Web Server (PWS) installed it runs fine, however when trying to run it on our server in the office it just displays the ASP code when the checklogin.asl page is called, and if you try it from a desktop it comes up with a you are about to download checklogin.asp page. Has anyone any ideas whats wrong, or can point me to a list on HTML and ASP etc. default.htm code below: Orridge Reporting Logon

Orridge & Co. Internet Reporting System

Enter Username & Password Below


Username:

Password:


checklogin.asp code is below: <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit %> <% Dim objConn Dim objRs Dim strSQL Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _ "DBQ=\\Development\C$\InetPub\Wwwroot\Genesis.mdb" objConn.Open Set objRs = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblUsers WHERE Username = '" & Request.Form("Username") & "'" objRs.Open strSQL, objConn If (objRs.EOF) Then Response.Write "" Response.Write "User Not Registered." Response.Write "" Response.End Else Response.Write "" Response.Write "User Found." Response.Write "" Response.End End If objRs.Close Set objRs = Nothing objConn.Close Set objConn = Nothing %> Thanks in advance for any help. Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun May 9 17:46:58 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:46:58 -0400 Subject: [dba-VB] .net assembler Message-ID: Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sun May 9 17:53:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 9 May 2004 18:53:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: Message-ID: On the same note, does anyone know how to look at the Microsoft Intermediate Language (PCODE) for the running program? I'd love to see that. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby Sent: Sunday, May 09, 2004 6:47 PM To: VBA; AccessD Subject: [dba-VB] .net assembler Just thought you folks might be interested. I found a right click menu item in VB.Net as I was stepping through my program... "Go to disassembly" that displays the machine code for the vb being processed. Ain't that cool? Not that I've even looked at assembler in more years than I'd care to admit (and no comments, never mind labels for the jump addresses) but it is still fascinating. Url = buf.Substring(4) 000000fe mov eax,dword ptr [ebp-4] 00000101 mov dword ptr [ebp-34h],eax 00000104 mov ecx,edi 00000106 mov edx,4 Url = buf.Substring(4) 0000010b cmp dword ptr [ecx],ecx 0000010d call FF482728 00000112 mov ebx,eax 00000114 mov eax,dword ptr [ebp-34h] 00000117 lea edx,[eax+8] 0000011a call 75ACCA48 Exit Do 0000011f nop 00000120 jmp 0000012B End If 00000122 nop Loop 00000123 nop Do While True 00000124 xor eax,eax 00000126 cmp eax,1 00000129 jne 000000D4 Reader.Close() 0000012b mov ecx,dword ptr [ebp-0Ch] 0000012e mov eax,dword ptr [ecx] 00000130 call dword ptr [eax+44h] 00000133 nop Stream.Close() 00000134 mov ecx,dword ptr [ebp-10h] 00000137 mov eax,dword ptr [ecx] 00000139 call dword ptr [eax+5Ch] 0000013c nop End Sub 0000013d nop 0000013e pop ebx 0000013f pop esi 00000140 pop edi 00000141 mov esp,ebp 00000143 pop ebp 00000144 ret John W. Colby www.ColbyConsulting.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From phpons at free.fr Mon May 10 05:45:06 2004 From: phpons at free.fr (Philippe Pons) Date: Mon, 10 May 2004 12:45:06 +0200 Subject: [dba-VB] .net assembler References: Message-ID: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Mon May 10 06:27:18 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Mon, 10 May 2004 07:27:18 -0400 Subject: [dba-VB] .net assembler In-Reply-To: <007a01c4367b$dc15ccb0$92257153@linceow2000pro> Message-ID: Cool, thanks. Just idle curiosity as to what it looks like. John W. Colby www.ColbyConsulting.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Philippe Pons Sent: Monday, May 10, 2004 6:45 AM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] .net assembler Hi, The .NET framework sdk ships with an IL disassembler called ILDASM(ildasm.exe) If you compiled a hello, world piece of code into a hello.dll, you can get the MSIL code by typing: c:\>ildasm hello.dll It generates a windows interface. HTH, Philippe ----- Original Message ----- From: "John W. Colby" To: Sent: Monday, May 10, 2004 12:53 AM Subject: RE: [dba-VB] .net assembler > On the same note, does anyone know how to look at the Microsoft Intermediate > Language (PCODE) for the running program? I'd love to see that. > > John W. Colby > www.ColbyConsulting.com > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby > Sent: Sunday, May 09, 2004 6:47 PM > To: VBA; AccessD > Subject: [dba-VB] .net assembler > > > Just thought you folks might be interested. I found a right click menu item > in VB.Net as I was stepping through my program... "Go to disassembly" that > displays the machine code for the vb being processed. Ain't that cool? Not > that I've even looked at assembler in more years than I'd care to admit (and > no comments, never mind labels for the jump addresses) but it is still > fascinating. > > Url = buf.Substring(4) > 000000fe mov eax,dword ptr [ebp-4] > 00000101 mov dword ptr [ebp-34h],eax > 00000104 mov ecx,edi > 00000106 mov edx,4 > Url = buf.Substring(4) > 0000010b cmp dword ptr [ecx],ecx > 0000010d call FF482728 > 00000112 mov ebx,eax > 00000114 mov eax,dword ptr [ebp-34h] > 00000117 lea edx,[eax+8] > 0000011a call 75ACCA48 > Exit Do > 0000011f nop > 00000120 jmp 0000012B > End If > 00000122 nop > Loop > 00000123 nop > Do While True > 00000124 xor eax,eax > 00000126 cmp eax,1 > 00000129 jne 000000D4 > Reader.Close() > 0000012b mov ecx,dword ptr [ebp-0Ch] > 0000012e mov eax,dword ptr [ecx] > 00000130 call dword ptr [eax+44h] > 00000133 nop > Stream.Close() > 00000134 mov ecx,dword ptr [ebp-10h] > 00000137 mov eax,dword ptr [ecx] > 00000139 call dword ptr [eax+5Ch] > 0000013c nop > End Sub > 0000013d nop > 0000013e pop ebx > 0000013f pop esi > 00000140 pop edi > 00000141 mov esp,ebp > 00000143 pop ebp > 00000144 ret > > John W. Colby > www.ColbyConsulting.com > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From AdamB at peabody.org.uk Thu May 13 08:10:47 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:10:47 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. Cheers Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From sgsax at ksu.edu Thu May 13 08:19:48 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Thu, 13 May 2004 08:19:48 -0500 Subject: [dba-VB] CreateObject, GetObject Functions In-Reply-To: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> References: <0655462503B0D4119A18009027454B5008FE2E5E@NTDATA> Message-ID: <1084454388.715.1.camel@sgsax-th4022.ksu.edu> Adam, If you try to run a GetObject and the object doesn't exist, does it return an error value? If so, you can simply always run GetObject first, and if it returns an error then run CreateObject. Just a thought. Seth On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > Question: > > I am trying to set the value of a Boolean variable on the basis of whether > an instance of Excel is running. In doing this I can then determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > > Cheers > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ##################################################################################### > This e-mail message has been scanned for Viruses and Content and cleared > by MailMarshal > For more information please visit www.marshalsoftware.com > ##################################################################################### > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual to whom it is addressed. Any views or > opinions presented are solely those of the author and do not necessarily > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received this > email in error and that any use, dissemination, forwarding, printing, or > copying of this email is strictly prohibited. If you have received this email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates Total > Virus Defense software's have swept this email message for the presence of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University From Bryan_Carbonnell at cbc.ca Thu May 13 08:18:38 2004 From: Bryan_Carbonnell at cbc.ca (Bryan Carbonnell) Date: Thu, 13 May 2004 09:18:38 -0400 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: Adam, Here is how I deal with this: 'Temporarily disable error handling On Error Resume Next 'Get a reference to an already open session on Excel Set objXL = GetObject(, "Excel.Application") 'Check to see if everything is ok If objXL Is Nothing Then 'Object is nothing, which means Excel is not open Set objXL = CreateObject("Excel.Application") bolWeLoaded = True End If 'Restore proper error handling On Error GoTo cmdExcel_Click_Error Bryan Carbonnell bryan_carbonnell at cbc.ca >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> Question: I am trying to set the value of a Boolean variable on the basis of whether an instance of Excel is running. In doing this I can then determine whether to perform a CreateObject or GetObject function. Do any of you have any suggestions. From AdamB at peabody.org.uk Thu May 13 08:36:59 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:36:59 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E5F@NTDATA> Yes indeed it does. I have tried error trapping for the run-time error that a failed GetObject function produces so that when it happens I perform the CreateObject function. But there must be another way of doing it surely? Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Seth Galitzer[SMTP:sgsax at ksu.edu] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:19 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > If you try to run a GetObject and the object doesn't exist, does it > return an error value? If so, you can simply always run GetObject > first, and if it returns an error then run CreateObject. > > Just a thought. > > Seth > > On Thu, 2004-05-13 at 08:10, Adam Borrie wrote: > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > whether > > an instance of Excel is running. In doing this I can then determine > whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > > > Cheers > > > > Adam Borrie > > Systems Manager > > Peabody Trust > > * 0207 021 4439 > > * adamb at peabody.org.uk > > > > > > > ########################################################################## > ########### > > This e-mail message has been scanned for Viruses and Content and cleared > > > by MailMarshal > > For more information please visit www.marshalsoftware.com > > > ########################################################################## > ########### > > > > This email and any files transmitted with it are confidential and > intended > > solely for the use of the individual to whom it is addressed. Any views > or > > opinions presented are solely those of the author and do not necessarily > > > represent those of the Peabody Trust. > > > > If you are not the intended recipient, be advised that you have received > this > > email in error and that any use, dissemination, forwarding, printing, or > > > copying of this email is strictly prohibited. If you have received this > email > > in error please notify the Peabody Trust IT Help Desk either by; > > > > Emailing helpdesk at peabody.org.uk > > > > Or by telephone on 020 79287811 > > > > Peabody Trust - http://www.peabody.org.uk > > > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > > > This footnote also confirms that MailMarshal and Network Associates > Total > > Virus Defense software's have swept this email message for the presence > of > > computer viruses http://www.marshalsoftware.com and http://www.nai.com > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > -- > Seth Galitzer sgsax at ksu.edu > Computing Specialist http://puma.agron.ksu.edu/~sgsax > Dept. of Plant Pathology > Kansas State University > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From AdamB at peabody.org.uk Thu May 13 08:41:42 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:41:42 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E61@NTDATA> Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether > an instance of Excel is running. In doing this I can then determine > whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From bkollodge at parkindustries.com Thu May 13 08:44:44 2004 From: bkollodge at parkindustries.com (bkollodge at parkindustries.com) Date: Thu, 13 May 2004 08:44:44 -0500 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: What would you change "Excel.Application" to if I wanted to see if MyVBApp.exe was already running? Thanks, Bill -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie Sent: May 13, 2004 8:42 To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] CreateObject, GetObject Functions Bryan you're a star! I had just come to the conclusion that I would have to error trap it, so thanks for the code. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:18 > To: dba-vb at databaseadvisors.com > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > Adam, > > Here is how I deal with this: > > 'Temporarily disable error handling > On Error Resume Next > 'Get a reference to an already open session on Excel > Set objXL = GetObject(, "Excel.Application") > 'Check to see if everything is ok > If objXL Is Nothing Then > 'Object is nothing, which means Excel is not open > Set objXL = CreateObject("Excel.Application") > bolWeLoaded = True > End If > > 'Restore proper error handling > On Error GoTo cmdExcel_Click_Error > > > Bryan Carbonnell > bryan_carbonnell at cbc.ca > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > Question: > > I am trying to set the value of a Boolean variable on the basis of > whether an instance of Excel is running. In doing this I can then > determine whether > to perform a CreateObject or GetObject function. > > Do any of you have any suggestions. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ######################################################################## ############# This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ######################################################################## ############# This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This Communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of the e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. This e-mail does not constitute consent to the use of the sender's contact information for direct marketing purposes or for transfers of data to third parties. From AdamB at peabody.org.uk Thu May 13 08:54:12 2004 From: AdamB at peabody.org.uk (Adam Borrie) Date: Thu, 13 May 2004 14:54:12 +0100 Subject: [dba-VB] CreateObject, GetObject Functions Message-ID: <0655462503B0D4119A18009027454B5008FE2E66@NTDATA> there is a PrevInstance property. Rather than me explain it, check out the online Help, it will make more sense than have me try to explain it. Adam Borrie Systems Manager Peabody Trust * 0207 021 4439 * adamb at peabody.org.uk > ---------- > From: > bkollodge at parkindustries.com[SMTP:bkollodge at parkindustries.com] > Reply To: dba-vb at databaseadvisors.com > Sent: 13 May 2004 14:44 > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > What would you change "Excel.Application" to if I wanted to see if > MyVBApp.exe was already running? > > Thanks, > Bill > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Adam Borrie > Sent: May 13, 2004 8:42 > To: 'dba-vb at databaseadvisors.com' > Subject: RE: [dba-VB] CreateObject, GetObject Functions > > > Bryan you're a star! > > I had just come to the conclusion that I would have to error trap it, so > thanks for the code. > > Adam Borrie > Systems Manager > Peabody Trust > * 0207 021 4439 > * adamb at peabody.org.uk > > > ---------- > > From: Bryan Carbonnell[SMTP:Bryan_Carbonnell at cbc.ca] > > Reply To: dba-vb at databaseadvisors.com > > Sent: 13 May 2004 14:18 > > To: dba-vb at databaseadvisors.com > > Subject: Re: [dba-VB] CreateObject, GetObject Functions > > > > Adam, > > > > Here is how I deal with this: > > > > 'Temporarily disable error handling > > On Error Resume Next > > 'Get a reference to an already open session on Excel > > Set objXL = GetObject(, "Excel.Application") > > 'Check to see if everything is ok > > If objXL Is Nothing Then > > 'Object is nothing, which means Excel is not open > > Set objXL = CreateObject("Excel.Application") > > bolWeLoaded = True > > End If > > > > 'Restore proper error handling > > On Error GoTo cmdExcel_Click_Error > > > > > > Bryan Carbonnell > > bryan_carbonnell at cbc.ca > > > > >>> AdamB at peabody.org.uk 13-May-04 9:10:47 AM >>> > > Question: > > > > I am trying to set the value of a Boolean variable on the basis of > > whether an instance of Excel is running. In doing this I can then > > determine whether > > to perform a CreateObject or GetObject function. > > > > Do any of you have any suggestions. > > _______________________________________________ > > dba-VB mailing list > > dba-VB at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-vb > > http://www.databaseadvisors.com > > > > ######################################################################## > ############# > This e-mail message has been scanned for Viruses and Content and cleared > > by MailMarshal > For more information please visit www.marshalsoftware.com > ######################################################################## > ############# > > This email and any files transmitted with it are confidential and > intended solely for the use of the individual to whom it is addressed. > Any views or > opinions presented are solely those of the author and do not necessarily > > represent those of the Peabody Trust. > > If you are not the intended recipient, be advised that you have received > this > email in error and that any use, dissemination, forwarding, printing, or > > copying of this email is strictly prohibited. If you have received this > email > in error please notify the Peabody Trust IT Help Desk either by; > > Emailing helpdesk at peabody.org.uk > > Or by telephone on 020 79287811 > > Peabody Trust - http://www.peabody.org.uk > > Please note that Peabody Trust encorporates Waltham Forest Community > Based Housing Association and Safe in the City. > > This footnote also confirms that MailMarshal and Network Associates > Total > Virus Defense software's have swept this email message for the presence > of > computer viruses http://www.marshalsoftware.com and http://www.nai.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > This Communication is for use by the intended recipient and contains > information that may be privileged, confidential or copyrighted under > applicable law. If you are not the intended recipient, you are hereby > formally notified that any use, copying or distribution of the e-mail, in > whole or in part, is strictly prohibited. Please notify the sender by > return e-mail and delete this e-mail from your system. This e-mail does > not constitute consent to the use of the sender's contact information for > direct marketing purposes or for transfers of data to third parties. > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal For more information please visit www.marshalsoftware.com ##################################################################################### This email and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Peabody Trust. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the Peabody Trust IT Help Desk either by; Emailing helpdesk at peabody.org.uk Or by telephone on 020 79287811 Peabody Trust - http://www.peabody.org.uk Please note that Peabody Trust encorporates Waltham Forest Community Based Housing Association and Safe in the City. This footnote also confirms that MailMarshal and Network Associates Total Virus Defense software's have swept this email message for the presence of computer viruses http://www.marshalsoftware.com and http://www.nai.com From JRojas at tnco-inc.com Wed May 19 13:04:27 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Wed, 19 May 2004 14:04:27 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE3@mercury.tnco-inc.com> Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From BBarabash at TappeConstruction.com Wed May 19 15:02:48 2004 From: BBarabash at TappeConstruction.com (Brett Barabash) Date: Wed, 19 May 2004 15:02:48 -0500 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <426071E0B0A6D311B3C0006008B0AB23AFE5ED@TAPPEEXCH01> My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com -------------------------------------------------------------------------------------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. From JRojas at tnco-inc.com Thu May 20 08:12:05 2004 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 20 May 2004 09:12:05 -0400 Subject: [dba-VB] VB.Net - Serial port communications Message-ID: <0CC84C9461AE6445AD5A602001C41C4B059CE5@mercury.tnco-inc.com> Thanks for the links. I guess MS released a VB.Net Resource Kit that includes a component that adds serial communication functionality. http://msdn.microsoft.com/vbasic/vbrkit/ JR -----Original Message----- From: Brett Barabash [mailto:BBarabash at tappeconstruction.com] Sent: Wednesday, May 19, 2004 4:03 PM To: 'dba-vb at databaseadvisors.com' Subject: RE: [dba-VB] VB.Net - Serial port communications My friend Google says: Serial Communication with VB.Net http://www.codeworks.it/net/VBNetRs232.htm Serial Communications : The .NET Way http://www.codeproject.com/dotnet/DotNetComPorts.asp -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Wednesday, May 19, 2004 1:04 PM To: 'dba-vb at databaseadvisors.com' Subject: [dba-VB] VB.Net - Serial port communications Hi All, I am eager to learn and start programming with .Net, initially with VB.Net. I thought that it might help the learning process by converting one of my VB6 programs to VB.Net to understand all the differences. The program that I was going to convert was one that uses the MSComm control that comes with VB6. When reading the .Net Framework documentation, I realized that there is no equivalent class, at least not yet. I know that I can use Win32 APIs to add this functionality but the great thing about the MSComm control was that it masked the "ugliness" and complexity of the APIs. Has anyone found a good replacement for the MSComm control for .Net? Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com ---------------------------------------------------------------------------- ---------------------------------------- The information in this email may contain confidential information that is legally privileged. The information is only for the use of the intended recipient(s) named above. If you are not the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or the taking of any action in regard to the content of this email is strictly prohibited. If transmission is incorrect, unclear, or incomplete, please notify the sender immediately. The authorized recipient(s) of this information is/are prohibited from disclosing this information to any other party and is/are required to destroy the information after its stated need has been fulfilled. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. This footer also confirms that this email message has been scanned for the presence of computer viruses.Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From mikedorism at adelphia.net Thu May 27 10:47:54 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Thu, 27 May 2004 11:47:54 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report Message-ID: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net From accessd at shaw.ca Thu May 27 19:42:19 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 27 May 2004 17:42:19 -0700 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c44401$f9dfdb30$cc0aa845@hargrove.internal> Message-ID: Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From mikedorism at adelphia.net Fri May 28 06:03:32 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Fri, 28 May 2004 07:03:32 -0400 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: Message-ID: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> I'm looking to change the height and width of the image container appropriately so that the picture doesn't get distorted -- not the size of the file itself. I know how to get the height and width of the image file. Just don't know what to do with that information. I obviously need to convert it to twips but what formula would I use? Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence (AccessD) Sent: Thursday, May 27, 2004 8:42 PM To: dba-vb at databaseadvisors.com Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report Can I assume that when you say size you mean size not height and width not size like in capacity (ie. 120K). The first one is easy to do setting a fixed image container on the report. To actually change the size of the file, automatically, would require access to various dlls or scripts files from a packages like Adobe Photoshop or Corel Painter but the result may not be what you expect or need. HTH Jim -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris Manning Sent: Thursday, May 27, 2004 8:48 AM To: dba-vb at databaseadvisors.com Subject: [dba-VB] Dynamically resizing an image on a Crystal Report VB.NET Crystal Reports 10 SQL Server 2000 I have a dataset that gets a dynamic image from a network location and displays it on a Crystal Report. My problem is that the size of the image files will vary and I need to resize the blob field on the report. Would anyone happen to have code for how to dynamically resize a blob field on a Crystal Report at runtime? Mike and Doris Manning mikedorism at adelphia.net _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From sgsax at ksu.edu Fri May 28 07:29:33 2004 From: sgsax at ksu.edu (Seth Galitzer) Date: Fri, 28 May 2004 07:29:33 -0500 Subject: [dba-VB] Dynamically resizing an image on a Crystal Report In-Reply-To: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> References: <000601c444a3$6a9e8c30$cc0aa845@hargrove.internal> Message-ID: <1085747373.8092.4.camel@sgsax-th4022.ksu.edu> Doris, In general, 1440 twips = 1 inch. So if you know the dimensions of your image in inches, you can use this. However, if you know the dimensions of your image in pixels, then you need to convert pixels to twips using some API coding I found this in the MS KB which should help you get going: "ACC: How to Convert Twips to Pixels" http://support.microsoft.com/default.aspx?scid=kb;en-us;Q94927 Enjoy! Seth On Fri, 2004-05-28 at 06:03, Mike & Doris Manning wrote: > I'm looking to change the height and width of the image container > appropriately so that the picture doesn't get distorted -- not the size of > the file itself. I know how to get the height and width of the image file. > Just don't know what to do with that information. I obviously need to > convert it to twips but what formula would I use? > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Thursday, May 27, 2004 8:42 PM > To: dba-vb at databaseadvisors.com > Subject: RE: [dba-VB] Dynamically resizing an image on a Crystal Report > > > Can I assume that when you say size you mean size not height and width not > size like in capacity (ie. 120K). The first one is easy to do setting a > fixed image container on the report. To actually change the size of the > file, automatically, would require access to various dlls or scripts files > from a packages like Adobe Photoshop or Corel Painter but the result may not > be what you expect or need. > > HTH > Jim > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Mike & Doris > Manning > Sent: Thursday, May 27, 2004 8:48 AM > To: dba-vb at databaseadvisors.com > Subject: [dba-VB] Dynamically resizing an image on a Crystal Report > > > VB.NET > Crystal Reports 10 > SQL Server 2000 > > I have a dataset that gets a dynamic image from a network location and > displays it on a Crystal Report. My problem is that the size of the image > files will vary and I need to resize the blob field on the report. > > Would anyone happen to have code for how to dynamically resize a blob field > on a Crystal Report at runtime? > > Mike and Doris Manning > mikedorism at adelphia.net > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University
") sHTML = sHTML.Concat(sHTML, oDataReader.GetValue(0) & "