Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
R

reykentj

@reykentj
About
Posts
17
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Cannot find the certificate
    R reykentj

    Cannot find the certificate 'AccountingCorp', because it does not exist or you do not have permission here is the sql USE master CREATE LOGIN Dave FROM certificate AccountingCorp; GO I created the certificate with this code. USE Frontier_equipment; CREATE CERTIFICATE AccountingCorp WITH SUBJECT = 'Frontier Accounting Records', EXPIRY_DATE = '10/31/2009'; GO rkj

    Database database cryptography

  • Deployment Error
    R reykentj

    C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Clrtest\Clrtest\Test Scripts\mFunctions.vb(904) : warning BC42016: Implicit conversion from 'Object' to 'Date'. Clrtest -> C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Clrtest\Clrtest\bin\Clrtest.dll Error: Column, parameter, or variable #1: Cannot find data type GL_Record. ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== Public Class GL_Record Public AccountNo As String = "" Public AccountField As String = "" Public Year As Integer = 0 Public Month As Integer = 0 Public YTD As Decimal = 0 Public MTD As Decimal = 0 Public LastTransAmount As Decimal Public LastTransDate As Date = "01/01/01" Public LastTransBy As String = "" Public LastEffectiveDate As Date = "01/01/01" Public NumberOfTrans As Long = 0 End Class _ Public Shared Sub sbSetupGLProbe(ByVal Selections As StoredProcedures.GL_Record) Dim stDocName As String Dim result As Long = 0 Try sbBuildGLQuery(Selections) stDocName = "rptGL_Probe" Catch fnHandleError("sbSetupGLProbe") End Try Exit Sub End Sub Help!!

    Visual Basic help csharp visual-studio sysadmin

  • Deployment Error
    R reykentj

    Error 1 Column, parameter, or variable #1: Cannot find data type GL_Record. Public Class GL_Record Public AccountNo As String = "" Public AccountField As String = "" Public Year As Integer = 0 Public Month As Integer = 0 Public YTD As Decimal = 0 Public MTD As Decimal = 0 Public LastTransAmount As Decimal Public LastTransDate As Date = "01/01/01" Public LastTransBy As String = "" Public LastEffectiveDate As Date = "01/01/01" Public NumberOfTrans As Long = 0 End Class _ Public Shared Sub sbSetupGLProbe(ByVal Selections As StoredProcedures.GL_Record) Dim stDocName As String Dim result As Long = 0 On Error GoTo Err_sbSetupGLProbe sbBuildGLQuery(Selections) stDocName = "rptGL_Probe" 'DoCmd.OpenReport(stDocName, acPreview) Exit_sbSetupGLProbe: Exit Sub Err_sbSetupGLProbe: MsgBox(Err.Description) Resume Exit_sbSetupGLProbe End Sub Thank you for that suggestion. This code complies withou error but fails on deployment. rkj

    Visual Basic sysadmin database sql-server help career

  • Deployment Error
    R reykentj

    Error 1 Column, parameter, or variable #1: Cannot find data type GL_Record. Clrtest Public Class GL_Record Public AccountNo As String = "" Public AccountField As String = "" Public Year As Integer = 0 Public Month As Integer = 0 Public YTD As Decimal = 0 Public MTD As Decimal = 0 Public LastTransAmount As Decimal Public LastTransDate As Date = "01/01/01" Public LastTransBy As String = "" Public LastEffectiveDate As Date = "01/01/01" Public NumberOfTrans As Long = 0 End Class _ Public Shared Sub sbSetupGLProbe(ByVal Selections As GL_Record) Dim stDocName As String Dim result As Long = 0 On Error GoTo Err_sbSetupGLProbe sbBuildGLQuery(Selections) stDocName = "rptGL_Probe" 'DoCmd.OpenReport(stDocName, acPreview) Exit_sbSetupGLProbe: Exit Sub Err_sbSetupGLProbe: MsgBox(Err.Description) Resume Exit_sbSetupGLProbe End Sub On Error is being used because this is a conversion of small modules which may be later converted to try catch rkj

    Visual Basic sysadmin database sql-server help career

  • Deployment Error
    R reykentj

    Error 1 Column, parameter, or variable #1: Cannot find data type GL_Record. Clrtest Microsoft.SqlServer.Server.SqlProcedure() Public Shared Sub sbSetupGLProbe(ByVal Selections As StoredProcedures.GL_Record) On Error GoTo Err_sbSetupGLProbe sbBuildGLQuery(Selections) Exit_sbSetupGLProbe: Exit Sub Err_sbSetupGLProbe: MsgBox(Err.Description) Resume Exit_sbSetupGLProbe End Sub This code will compile and deploy when the Sql Server attribute is omitted but then t_sql cannot see it. rkj

    Visual Basic sysadmin database sql-server help career

  • Test.sql cannot find my test
    R reykentj

    Thank You Very Much. That Solved the problem:) rkj

    Visual Basic database csharp visual-studio help career

  • Test.sql cannot find my test
    R reykentj

    Env: SQL2005 Sp2 Visual Studio 2005 Could not find stored procedure 'sbSetupDeptProfitnLoss'. Test.sql has statement exec sbSetupDeptProfitnLoss 1, 10,'6/1/2006' A vb module in this project has Partial Public Class StoredProcedures Public Shared Sub sbSetupDeptProfitnLoss(ByVal BranchCode As Long, _ ByVal DepartmentCode As Long, _ ByVal RequestDate As Date) Dim DepartmentName As String Dim result As Object Dim stDocName As String Dim StartofMonth As Date Dim EndOfMonth As Date Dim StrStartofMonth As String Dim fnBuildBudgetQuery On Error GoTo Err_sbSetupDeptProfitnLoss sbGetDepartmentName(DepartmentCode, DepartmentName) StrStartofMonth = DatePart("m", RequestDate) & "/" & "01/" & DatePart("yyyy", RequestDate) StartofMonth = StrStartofMonth EndOfMonth = EOMonth(StartofMonth, 1) sbBuild_L1QueryDeptSalesDetail(BranchCode, DepartmentCode, StartofMonth, EndOfMonth) sbBuild_L1QueryDeptCostOfGoodsDetail(BranchCode, DepartmentCode, StartofMonth, EndOfMonth) sbBuild_L1QueryDeptExpensesDetail(BranchCode, DepartmentCode, StartofMonth, EndOfMonth) sbBuildDeptSummaryProfitnLossTable(DepartmentCode, RequestDate) stDocName = "rptDeptProfitnLoss" 'DoCmd.OpenReport(stDocName, acPreview) Exit_sbSetupDeptProfitnLoss: Exit Sub Err_sbSetupDeptProfitnLoss: fnHandleError("sbSetupDeptProfitnLoss") Resume Exit_sbSetupDeptProfitnLoss Resume End Sub End Class rkj

    Visual Basic database csharp visual-studio help career

  • Connection Error
    R reykentj

    I was using that but I needed the MARS capability.:) rkj

    Visual Basic database csharp sql-server visual-studio sysadmin

  • Connection Error
    R reykentj

    The stored procedures are on the same machine as the server. Replacing server(local) with servername\server made the whole thing work.:) rkj

    Visual Basic database csharp sql-server visual-studio sysadmin

  • Connection Error
    R reykentj

    I had read that Stored procedures running within the SQL Server could use the local option for server name. Placing the combined servername\sqlservername as the servername worked.!! Thank you.:):) rkj

    Visual Basic database csharp sql-server visual-studio sysadmin

  • Connection Error
    R reykentj

    Environment: Op Sys 2003 server; Sql Server 2005 with update; Visual Studio; Multiple VB functions and subroutines as stored procedures.This subroutine needs to use a connection string to enable MARS. It does not have the SQL Attributes. They seem to prohibit byref class instantiations being returned. Dim connectionString As String = _ "server=(local);" & _ "Trusted_Connection=yes;" & _ "database=Frontier_equipment;" & _ "MultipleActiveResultSets=true;" RecordTypeConnection = New SqlConnection() RecordTypeConnection.ConnectionString = connectionString RecordTypeConnection.Open() Error Numr 5 Error Desc An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) rkj

    Visual Basic database csharp sql-server visual-studio sysadmin

  • How do I make multiple sqlDataReaders work
    R reykentj

    Running the code last provided "Error The context connection is already in use. occurred in Module: sbUpdateSummaryProfitnLossTableRecord" "Error 5 occurred in Module: sbUpdateSummaryProfitnLossTableRecord" was obtained from my error handling I captured the following output. A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll A first chance exception of type 'System.IO.FileNotFoundException' occurred in Clrtest I think I am trying to use MARS in this environment. Is this even possible? rkj -- modified at 0:33 Sunday 15th April, 2007

    Visual Basic database csharp sql-server sysadmin

  • How do I make multiple sqlDataReaders work
    R reykentj

    I did not originally have the sql server attribute declared Your first question prompted me to insert that and try again. When I did, I got a deployment error on the byref use. I am currently trying to find another attribute to solve that problem. Here is the code _ Public Shared Sub sbBuildRecordTypeProfitnLossTable(ByVal Account_Summary_Name As String, _ ByVal RecordTypeQueryName As String, _ ByVal DirectoryPath As String, _ ByVal Run_Select As Long, _ ByVal Department As String, _ ByVal Record_Type As Single, _ ByVal record_count As Long, _ ByVal Pdate As Date, _ ByRef PL_Return As Profit_Loss_Return) Dim Wrec As New Profit_Loss_Summary_Record Dim ProfitnLossRec As New Profit_Loss_Summary_Record Dim wSalesRec As New Profit_Loss_Summary_Record Dim TotMonthly_Item As Decimal = 0 Dim TotYearly_Item As Decimal = 0 Dim result As Long = 0 Dim SalesAccountNo As Long = 0 Dim AccountStor As Long = 0 Dim StrSalesAccountNo As String = "" Dim CGAccountNo As Long = 0 Dim Branch_Name As String = "" Dim ReturnValues As New Profit_Loss_Return Dim wdepartment As String = "" Dim sql As String = "" Dim RecordTypeSet As SqlDataReader Dim RecordTypeConnection As New SqlConnection Dim RecordTypeCommand As New SqlCommand On Error GoTo Err_sbBuildRecordTypeProfitnLossTable sql = File.ReadAllText(DirectoryPath & RecordTypeQueryName) RecordTypeConnection = New SqlConnection("context connection = true") RecordTypeConnection.Open() RecordTypeCommand = New SqlCommand(Sql, RecordTypeConnection) RecordTypeSet = RecordTypeCommand.ExecuteReader() While RecordTypeSet.Read() AccountStor = RecordTypeSet!AccountNo If AccountStor = 53410 Then record_count = record_count End If sbBuildSummaryProfitnLossTableRec(RecordTypeSet, Record_Type, Department, Pdate, Profi

    Visual Basic database csharp sql-server sysadmin

  • How do I make multiple sqlDataReaders work
    R reykentj

    Sub_A Dim sql As String = "" Dim rdr1 As SqlDataReader Dim conn1 As New SqlConnection Dim cmd1 As New SqlCommand sql = ReadAllText from textfile conn1 = New SqlConnection("context connection = true") conn1.Open() cmd1 = New SqlCommand(Sql, conn1) rdr1 = cmd1.ExecuteReader() While rdr1.Read() build record REC_A Sub_B (REC_A) SUB_B Dim sql As String = "" Dim rdr2 As SqlDataReader Dim conn2 As New SqlConnection Dim cmd2 As New SqlCommand Builds SQl Query to insert record into some table conn2 = New SqlConnection("context connection = true") conn2.Open() ABORTS HERE eND sUB_b wend End Sun_A With SqlProcedure Attribute I get a deployment error on SUB_A because it has a Byref Class instantiation to return data to the caller rkj

    Visual Basic database csharp sql-server sysadmin

  • How do I make multiple sqlDataReaders work
    R reykentj

    Stored VB.Net procedures consisting of many subroutines and a few functions working with one SQL Server 2005 datbase. The problem is as follows: Sub A receives a table name, a query name, and a directory path name.Using Dim RecordTypeSet As SqlDataReader Dim RecordTypeConnection As New SqlConnection Dim RecordTypeCommand As New SqlCommand I open a reader from the sql located at directory path name & query name and While RecordTypeSet.Read() I create a record which I want to store in the table name provided. In order to do this I call a SUB B with the record and the Table name. Sub B builds an insert query and using Dim SummaryConnection As SqlConnection Dim SummaryCommand As SqlCommand Dim SummaryReader As SqlDataReader SummaryConnection = New SqlConnection("context connection = true") SummaryConnection.Open() SummaryCommand = New SqlCommand(sql, SummaryConnection) SummaryReader = SummaryCommand.ExecuteReader() errors out on SummaryConnection.Open() end sub B wend rkj

    Visual Basic database csharp sql-server sysadmin

  • How do I initialize instantiiation of a multifield record
    R reykentj

    That did work. Thank you very much!!:) rkj

    Visual Basic csharp database sql-server visual-studio

  • How do I initialize instantiiation of a multifield record
    R reykentj

    ENvironment. VB.net, SQl Server 2005, Visual Studio 2005, VB.net Stored procedures. I have defined a public class foo public index as long public fname as string public lname as string end class A sub wants to use this class as folows: Public Shared sub doit(byval fname as string, byval lname as string) dim myrecord as foo myrecord.fname = fname visual studio and vb tell me that my record is not initialized and may throw an exception if it is used without being initialized. It does throw an exception. How do I initialize myrecord. I have tried public class foo public index as long = 0 public fname as string = "xxx" public lname as string = "xxx" end class The compiler did not complain, but it did not solve the problem. rkj

    Visual Basic csharp database sql-server visual-studio
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups