15,904,655 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10033107 (Top 54 by date)
Member 10033107
11-Jul-13 8:33am
View
for example i named 'status' as
in table 1 I use sta_tus and in table 2 is status..
there will be an effect using different column identifier? yet it has same value..? did you get me ?
Member 10033107
11-Jul-13 8:26am
View
what if i use different columns name but same values?? there will be effect using this code?? btw thanks for you response :))
Member 10033107
11-Jul-13 8:13am
View
yes i will program in sql server as my database wherein i will use it to get the values and compare it??
Member 10033107
10-Jul-13 2:47am
View
ok i will improve this question
Member 10033107
10-Jul-13 2:07am
View
there is no problem with the code yet i want to figure out how will i put insert statement with thw code i post where i can put an insert statement here into my table dbo.tblsummaryimport (table) within the column 'STATUS' of the table in which the column 'Status' inserted the statuslevel..
Member 10033107
26-Jun-13 4:01am
View
no..im just using microsoft visual studio 2010
Member 10033107
26-Jun-13 3:09am
View
hi richard.. the error called in my program like this
Type 'PageFunction' is not defined
Member 10033107
26-Jun-13 3:04am
View
dt = CType(Session("dt"), Data.DataTable)
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
Dim str As New StringBuilder()
Try
str.Append("Registration Date" & delimiter & "Account No." & delimiter & "Telephone No." & delimiter & "Email Address" & delimiter & "Post Date" & vbCrLf)
For Each oRow As Data.DataRow In dt.Rows
dVDate = oRow("DteStp").ToString
strViewDate = dVDate.ToShortDateString
strAcctNo = oRow("AccountNo").ToString.Trim
strTelNo = oRow("AreaTele").ToString.Trim
strEmail = oRow("EmailAddress").ToString.Trim
dPostDate = oRow("ProcessDate")
If dPostDate <= "01/01/2000" Then
strPostDate = ""
Else
strPostDate = dPostDate.ToShortDateString
End If
str.Append(strViewDate & delimiter & strAcctNo & delimiter & strTelNo & delimiter & strEmail & delimiter & strPostDate & vbCrLf)
Next
Response.Buffer = True
Response.AddHeader("Content-Disposition", "attachment;filename=WIFI_Registrants_" & sDateFormat & ".txt")
Response.ContentType = "text/plain"
Response.Write(str.ToString())
Catch ex As Exception
Response.Redirect("ErrorPage.aspx?id=" & pFun.Set_ErrorMessage(ex.Message, ex.ToString, Request.RawUrl.Trim).ToString, False)
End Try
Else
CloseWindow()
End If
End If
Else
Response.Redirect("Login.aspx")
End If
End Sub
Private Function GetConfig(ByVal key As String) As String
GetConfig = System.Configuration.ConfigurationManager.AppSettings(key).ToString
End Function
Private Sub CloseWindow()
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "xCloser", "window.close();", True)
End Sub
Private Sub MessageAndCloseWindow(ByVal msg As String)
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "xCloser", "alert('" & msg & "'); window.close();", True)
End Sub
End Class
Member 10033107
26-Jun-13 2:56am
View
hi Andrew.. i just use Today.Date and its fine working now thanks :)
Member 10033107
25-Jun-13 2:29am
View
Hi Andrew! your approach to my question is right to your understanding since i change datetime.now.tostring it gets an error so i change it as
Today.TimeOfDay.ToString
yet i got an error to quoted: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. it means it should be specific so how can i do that to fix this?
Member 10033107
24-Jun-13 4:37am
View
as i put this command
Imports System.Windows.Navigation
it gets still an error yet there's no message on its pop error cause..
Member 10033107
24-Jun-13 2:43am
View
the first comment in this trend was the continuation of my code :)
Member 10033107
24-Jun-13 2:42am
View
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
Dim str As New StringBuilder()
Try
str.Append("Registration Date" & delimiter & "Account No." & delimiter & "Telephone No." & delimiter & "Email Address" & delimiter & "Post Date" & vbCrLf)
For Each oRow As Data.DataRow In dt.Rows
dVDate = oRow("DteStp").ToString
strViewDate = dVDate.ToShortDateString
strAcctNo = oRow("AccountNo").ToString.Trim
strTelNo = oRow("AreaTele").ToString.Trim
strEmail = oRow("EmailAddress").ToString.Trim
dPostDate = oRow("ProcessDate")
If dPostDate <= "01/01/2000" Then
strPostDate = ""
Else
strPostDate = dPostDate.ToShortDateString
End If
str.Append(strViewDate & delimiter & strAcctNo & delimiter & strTelNo & delimiter & strEmail & delimiter & strPostDate & vbCrLf)
Next
Response.Buffer = True
Response.AddHeader("Content-Disposition", "attachment;filename=WIFI_Registrants_" & sDateFormat & ".txt")
Response.ContentType = "text/plain"
Response.Write(str.ToString())
Catch ex As Exception
Response.Redirect("ErrorPage.aspx?id=" & pFun.Set_ErrorMessage(ex.Message, ex.ToString, Request.RawUrl.Trim).ToString, False)
End Try
Else
CloseWindow()
End If
End If
Else
Response.Redirect("Login.aspx")
End If
End Sub
Member 10033107
13-Jun-13 7:25am
View
ooh i already get whats my error..btw thanks guys :)
Member 10033107
13-Jun-13 7:21am
View
this is what i meant..i already coded this :
ALTER PROCEDURE [dbo].[promocodestat]
@promocode varchar(MAX),
@loanstatus varchar (MAX)
AS
BEGIN
SET NOCOUNT ON;
UPDATE tblsummaryIMPORT SET loanstatus = 'for payment' WHERE loanstatus=@loanstatus AND promocode LIKE '%without loan%'
UPDATE tblsummaryIMPORT SET loanstatus = 'for loan approval' WHERE loanstatus=@loanstatus AND promocode LIKE '%with loan%'
yet it cannot insert on the table the status for loan approval or else for payment
Member 10033107
13-Jun-13 7:03am
View
ooh i see again thanks mike meinz.. btw i have follow up question wherein i already use original griff code and this is my question: how can i add this code kinda it its like using an else statement for with loan?? or should i add again the code by using 'with loan' ??
Member 10033107
13-Jun-13 6:54am
View
and when i use @originalgriff code it was successful thanks !
but i have a question how can i add this code kinda it its like using an else statement for with loan?? or should i add again the code by using 'with loan' ??
Member 10033107
13-Jun-13 6:51am
View
okay guys this is my full command in stored proc:
CREATE PROCEDURE [dbo].[promocodestat]
@promocode varchar(MAX),
@loanstatus varchar (MAX)
AS
BEGIN
SET NOCOUNT ON;
select * from tblsummaryIMPORT where promocode like 'without loan'
update tblsummaryIMPORT set status = 'for payment' where set status=@status
END
having an error message: Msg 156, Level 15, State 1, Procedure promocodestat, Line 8
Incorrect syntax near the keyword 'set'.
Member 10033107
13-Jun-13 6:47am
View
OriginalGriff.. youve got it im sorry if i cant post my code because my other team use the server so ill post later what happen thanks for the response guys
Member 10033107
12-Jun-13 20:59pm
View
>.< geez!! yes sir .. i dont have any errors on this code yet.. for example im the user number 3 (wherein i cant post because its too long) as ive been login in that homepage, i expect ONLY to access client.aspx and rfc.aspx that still i been seen the other page i cannot or im not to expect to be access too.. what im gonna suppose to do with that sir >.<
Member 10033107
12-Jun-13 20:45pm
View
wherein im looking forward to create a login user that he/she only access a limited pages yet i have trouble in here that still he/she saw all pages that not to be access on that page.. i hope you understand what im meant to say thanks
Member 10033107
12-Jun-13 20:42pm
View
yes i know that.. okay this is what i meant to say.. I created a user roles in my page wherein the registered roles has different page that can only be access in different user... this is my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim user
user = Request.QueryString("muser")
If user = "" Then
Response.Redirect("loginuser.aspx")
Else
labUser.Text = ""
End If
'Dim n As Integer = [String].Compare(Request.QueryString("username"), "")
'If n <= 0 Then
' Server.Transfer("defmain.aspx")
'Else
' labWelcome.Text = "Welcome, " & Request.QueryString("username") & "!"
'End If
Select Case Request.QueryString("userroles")
Case "1"
mnMain.Items(0).NavigateUrl = "~/CyberyaLogo.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username")
mnMain.Items(1).ChildItems(1).NavigateUrl = "~/Sales.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username")
mnMain.Items(1).ChildItems(2).NavigateUrl = "~/RFC.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
mnMain.Items(1).ChildItems(3).NavigateUrl = "~/Marketing.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
mnMain.Items(1).ChildItems(4).NavigateUrl = "~/PCExpress.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
mnMain.Items(1).ChildItems(5).NavigateUrl = "~/Client.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
ifMain.Attributes("src") = "CyberyaLogo.aspx?userrole=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username")
Exit Select
Case "2"
mnMain.Items(0).NavigateUrl = "~/CyberyaLogo.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username")
mnMain.Items(1).ChildItems(1).NavigateUrl = "~/Sales.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username")
mnMain.Items(1).ChildItems(2).NavigateUrl = "~/RFC.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
mnMain.Items(1).ChildItems(3).NavigateUrl = "~/Marketing.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
mnMain.Items(1).ChildItems(4).NavigateUrl = "~/PCExpress.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
mnMain.Items(1).ChildItems(5).NavigateUrl = "~/Client.aspx?userroles=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username") & "&mode=0"
ifMain.Attributes("src") = "CyberyaLogo.aspx?userrole=" & Request.QueryString("userroles") & "&username=" & Request.QueryString("username")
If Not IsPostBack Then
'mnMain.Items[1].ChildItems.RemoveAt(3);
mnMain.Items.RemoveAt(2)
End If
Exit Select
Case Else
Exit Select
End Select
End Sub
Member 10033107
6-Jun-13 8:59am
View
ok i see i will check my code thanks
Member 10033107
6-Jun-13 8:39am
View
SET @PaymentType= ''
SELECT @PaymentType= COALESCE(@PaymentType+',' ,'') + PaymentType
FROM tblsummaryIMPORT
SELECT @PaymentType
SET @ApplicationDate= ''
SELECT @ApplicationDate= COALESCE(@ApplicationDate+',' ,'') + ApplicationDate
FROM tblsummaryIMPORT
SELECT @ApplicationDate
SET @EndorsedDate= ''
SELECT @EndorsedDate= COALESCE(@EndorsedDate+',' ,'') + EndorsedDate
FROM tblsummaryIMPORT
SELECT @EndorsedDate
SET @PaymentDate= ''
SELECT @PaymentDate= COALESCE(@PaymentDate+',' ,'') + PaymentDate
FROM tblsummaryIMPORT
SELECT @PaymentDate
SET @ScheduleDate= ''
SELECT @ScheduleDate= COALESCE(@ScheduleDate+',' ,'') +ScheduleDate
FROM tblsummaryIMPORT
SELECT @ScheduleDate
SET @ActivationDate= ''
SELECT @ActivationDate= COALESCE(@ActivationDate+',' ,'') +ActivationDate
FROM tblsummaryIMPORT
SELECT @ActivationDate
SET @PCDelivery= ''
SELECT @PCDelivery= COALESCE(@PCDelivery+',' ,'') +PCDelivery
FROM tblsummaryIMPORT
SELECT @PCDelivery
SET @NoPCAvailed= ''
SELECT @NoPCAvailed= COALESCE(@NoPCAvailed+',' ,'') +NoPCAvailed
FROM tblsummaryIMPORT
SELECT @NoPCAvailed
SET @datepcpickedup= ''
SELECT @datepcpickedup= COALESCE(@datepcpickedup+',' ,'') +datepcpickedup
FROM tblsummaryIMPORT
SELECT @datepcpickedup
SET @pcissuance= ''
SELECT @pcissuance= COALESCE(@pcissuance+',' ,'') +pcissuance
FROM tblsummaryIMPORT
SELECT @pcissuance
SET @SalesAgent= ''
SELECT @SalesAgent= COALESCE(@SalesAgent+',' ,'') +SalesAgent
FROM tblsummaryIMPORT
SELECT @SalesAgent
SET @Coordinator= ''
SELECT @Coordinator= COALESCE(@Coordinator+',' ,'') +Coordinator
FROM tblsummaryIMPORT
SELECT @Coordinator
SET @SalesChannel= ''
SELECT @SalesChannel= COALESCE(@SalesChannel+',' ,'') +SalesChannel
FROM tblsummaryIMPORT
SELECT @SalesChannel
SET @SalesGroup= ''
SELECT @SalesGroup= COALESCE(@SalesGroup+',' ,'') +SalesGroup
FROM tblsummaryIMPORT
SELECT @SalesGroup
SET @CreatedBy= ''
SELECT @CreatedBy= COALESCE(@CreatedBy+',' ,'') +CreatedBy
FROM tblsummaryIMPORT
SELECT @CreatedBy
SET @LoanStatus= ''
SELECT @LoanStatus= COALESCE(@LoanStatus+',' ,'') +LoanStatus
FROM tblsummaryIMPORT
SELECT @LoanStatus
SET @TimeStamp= ''
SELECT @TimeStamp= COALESCE(@TimeStamp+',' ,'') +TimeStamp
FROM tblsummaryIMPORT
SELECT @TimeStamp
INSERT INTO dbo.tblsummaryIMPORT(
ID,SRCode,SRNumber,[Status],CustomerName,HomeContact,
BusinessContact,MobileContact,LotHouseNo,RoomUnitStall,
BldgFloor,BldgName,Street,Subdivision,Barangay,
CityMunicipality,Province,Region,Package,PromoCode,
PaymentType,ApplicationDate,EndorsedDate,PaymentDate,
ScheduleDate,ActivationDate,PCDelivery,NoPCAvailed,
datepcpickedup,pcissuance,SalesAgent,Coordinator,
SalesChannel,SalesGroup,CreatedBy,LoanStatus,[TimeStamp])
VALUES(
@ID,@SRCode,@SRNumber,@Status,@CustomerName,@HomeContact,
@BusinessContact,@MobileContact,@LotHouseNo,@RoomUnitStall,
@BldgFloor,@BldgName,@Street,@Subdivision,@Barangay,
@CityMunicipality,@Province,@Region,@Package,@PromoCode,
@PaymentType,@ApplicationDate,@EndorsedDate,@PaymentDate,
@ScheduleDate,@ActivationDate,@PCDelivery,@NoPCAvailed,
@datepcpickedup,@pcissuance,@SalesAgent,@Coordinator,
@SalesChannel,@SalesGroup,@CreatedBy,@LoanStatus,@TimeStamp)
RETURN @@IDENTITY
END
Member 10033107
6-Jun-13 8:39am
View
and this is for stored procedure command:
ALTER procedure [dbo].[PopulateSummaryImport_SP]
@ID BIGINT,
@SRCode VARCHAR (50),
@SRNumber VARCHAR (50),
@Status VARCHAR (MAX),
@CustomerName VARCHAR (MAX),
@HomeContact VARCHAR (MAX),
@BusinessContact VARCHAR (MAX),
@MobileContact VARCHAR (MAX),
@LotHouseNo VARCHAR (MAX),
@RoomUnitStall VARCHAR (MAX),
@BldgFloor VARCHAR (MAX),
@BldgName VARCHAR (MAX),
@Street VARCHAR (MAX),
@Subdivision VARCHAR (MAX),
@Barangay VARCHAR (MAX),
@CityMunicipality VARCHAR(MAX),
@Province VARCHAR (MAX),
@Region VARCHAR (MAX),
@Package VARCHAR (MAX),
@PromoCode VARCHAR (MAX),
@PaymentType VARCHAR (MAX),
@ApplicationDate DATETIME,
@EndorsedDate DATETIME,
@PaymentDate DATETIME,
@ScheduleDate DATETIME,
@ActivationDate DATETIME,
@PCDelivery VARCHAR (MAX),
@NoPCAvailed VARCHAR (50),
@datepcpickedup DATETIME,
@pcissuance VARCHAR (MAX),
@SalesAgent VARCHAR (MAX),
@Coordinator VARCHAR (MAX),
@SalesChannel VARCHAR (MAX),
@SalesGroup VARCHAR (MAX),
@CreatedBy VARCHAR (MAX),
@LoanStatus VARCHAR (MAX),
@TimeStamp DATETIME
AS
BEGIN
SET @ID= ''
SELECT @ID = COALESCE(@ID+',' ,'') + ID
FROM tblsummaryIMPORT
SELECT @ID
SET @SRCode= ''
SELECT @SRCode = COALESCE(@SRCode+',' ,'') + SRCode
FROM tblsummaryIMPORT
SELECT @SRCode
SET @SRNumber= ''
SELECT @SRNumber = COALESCE(@SRNumber+',' ,'') + SRNumber
FROM tblsummaryIMPORT
SELECT @SRNumber
SET @Status= ''
SELECT @Status = COALESCE(@Status+',' ,'') + Status
FROM tblsummaryIMPORT
SELECT @Status
SET @CustomerName= ''
SELECT @CustomerName = COALESCE(@CustomerName+',' ,'') + customername
FROM tblsummaryIMPORT
SELECT @CustomerName
SET @HomeContact= ''
SELECT @HomeContact = COALESCE(@HomeContact+',' ,'') + HomeContact
FROM tblsummaryIMPORT
SELECT @HomeContact
SET @BusinessContact= ''
SELECT @BusinessContact = COALESCE(@BusinessContact+',' ,'') + businesscontact
FROM tblsummaryIMPORT
SELECT @BusinessContact
SET @MobileContact= ''
SELECT @MobileContact = COALESCE(@MobileContact+',' ,'') + MobileContact
FROM tblsummaryIMPORT
SELECT @MobileContact
SET @LotHouseNo= ''
SELECT @LotHouseNo = COALESCE(@LotHouseNo+',' ,'') + LotHouseNo
FROM tblsummaryIMPORT
SELECT @LotHouseNo
SET @RoomUnitStall= ''
SELECT @RoomUnitStall = COALESCE(@RoomUnitStall+',' ,'') + RoomUnitStall
FROM tblsummaryIMPORT
SELECT @RoomUnitStall
SET @BldgFloor= ''
SELECT @BldgFloor = COALESCE(@BldgFloor+',' ,'') + BldgFloor
FROM tblsummaryIMPORT
SELECT @BldgFloor
SET @BldgName= ''
SELECT @BldgName = COALESCE(@BldgName+',' ,'') + BldgName
FROM tblsummaryIMPORT
SELECT @BldgName
SET @Street= ''
SELECT @Street = COALESCE(@Street+',' ,'') + Street
FROM tblsummaryIMPORT
SELECT @Street
SET @Subdivision= ''
SELECT @Subdivision = COALESCE(@Subdivision+',' ,'') + Subdivision
FROM tblsummaryIMPORT
SELECT @Subdivision
SET @Barangay= ''
SELECT @Barangay= COALESCE(@Barangay+',' ,'') + Barangay
FROM tblsummaryIMPORT
SELECT @Barangay
SET @CityMunicipality= ''
SELECT @CityMunicipality= COALESCE(@CityMunicipality+',' ,'') + CityMunicipality
FROM tblsummaryIMPORT
SELECT @CityMunicipality
SET @Province= ''
SELECT @Province= COALESCE(@Province+',' ,'') + Province
FROM tblsummaryIMPORT
SELECT @Province
SET @Region= ''
SELECT @Region= COALESCE(@Region+',' ,'') + Region
FROM tblsummaryIMPORT
SELECT @Region
SET @Package= ''
SELECT @Package= COALESCE(@Package+',' ,'') + Package
FROM tblsummaryIMPORT
SELECT @Package
SET @PromoCode= ''
SELECT @PromoCode= COALESCE(@PromoCode+',' ,'') + PromoCode
FROM tblsummaryIMPORT
SELECT @PromoCode
SET @PaymentType= ''
SELECT @PaymentType= COALESCE(@PaymentType+',' ,'') + PaymentType
FROM tblsummaryIMPORT
SELECT @PaymentType
SET @ApplicationDate= ''
SELECT @ApplicationDate= COALESCE(@ApplicationDate+',' ,'') + ApplicationDate
FROM tblsummaryIMPORT
SELECT @ApplicationDate
SET @EndorsedDate= ''
SELECT @EndorsedDate= COALESCE(@EndorsedDate+',' ,'') + EndorsedDate
FROM tblsummaryIMPORT
SELECT @EndorsedDate
SET @PaymentDate= ''
SELECT @PaymentDate= COALESCE(@PaymentDate+',' ,'') + P
Member 10033107
6-Jun-13 8:37am
View
Private Sub myconnect2(ByVal sourceTbl As DataTable)
Try
If sourceTbl IsNot Nothing AndAlso sourceTbl.Rows.Count > 0 Then
'count status SRN SrCode SrNumber Customer_Name Home_Contact Business_Contact Mobile_Contact
'LotHouseNo RoomUnitStall BldgFloor BldgName Street Subdivision Barangay City_Municipality
'Province Region Package Promo_Code Payment Type Application_Date Endorsed_date status Payment_Date
'Schedule_Date Activation_Date PC Delivery No. PC Availed Date PC Pick-Up PC_Issuance SalesAgent
'Coordinator Sales Channel Sales Group Created by TimeStamp
Dim i As Integer = 0
For Each dr As DataRow In sourceTbl.Rows
If IsNumeric(dr("count").ToString) Then
i += SubmitRawData(CInt(dr("count").ToString), _
dr("SRN").ToString, _
dr("SrCode").ToString, _
dr("SrNumber").ToString, _
dr("status").ToString, _
dr("Customer_Name").ToString, _
dr("Home_Contact").ToString, _
dr("Business_Contact").ToString, _
dr("Mobile_Contact").ToString, _
dr("LotHouseNo").ToString, _
dr("RoomUnitStall").ToString, _
dr("BldgFloor").ToString, _
dr("BldgName").ToString, _
dr("Street").ToString, _
dr("Subdivision").ToString, _
dr("Barangay").ToString, _
dr("City_Municipality").ToString, _
dr("Province").ToString, _
dr("Region").ToString, _
dr("Package").ToString, _
dr("Promo_Code").ToString, _
dr("Payment Type").ToString, _
CDate(IIf(IsDate(dr("Application_Date").ToString), dr("Application_Date").ToString, "1/1/2013")), _
CDate(IIf(IsDate(dr("Payment_Date").ToString), dr("Payment_Date").ToString, "1/1/2013")), _
CDate(IIf(IsDate(dr("Endorsed_date").ToString), dr("Endorsed_date").ToString, "1/1/2013")), _
CDate(IIf(IsDate(dr("Schedule_Date").ToString), dr("Schedule_Date").ToString, "1/1/2013")), _
CDate(IIf(IsDate(dr("Activation_Date").ToString), dr("Activation_Date").ToString, "1/1/2013")), _
dr("PC Delivery").ToString, _
dr("No. PC Availed").ToString, _
CDate(IIf(IsDate(dr("Date PC Pick-Up").ToString), dr("Date PC Pick-Up").ToString, "1/1/2013")), _
dr("SalesAgent").ToString, _
dr("Coordinator").ToString, _
dr("Sales Channel").ToString, _
dr("Sales Group").ToString, _
dr("Created by").ToString, _
"LOAN", _
CDate(IIf(IsDate(dr("Timestamp").ToString), dr("Timestamp").ToString, "1/1/2013")), _
dr("PC_Issuance").ToString)
End If
Next
MsgBox("Success")
Else
MsgBox("No data found.")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Member 10033107
6-Jun-13 8:28am
View
Deleted
okay this is the back end program hope you can make do some advice or help to fix my error as well ..
Public Function SubmitRawData(ByVal vid As Integer, ByVal vsrn As String, ByVal vsrcode As String, ByVal vsrnumber As String, _
ByVal vstatus As String, ByVal vCustomerName As String, ByVal vHomeContact As String, ByVal vBusinessContact As String, _
ByVal vMobileContact As String, ByVal vLotHouseNo As String, ByVal vRoomUnitStall As String, ByVal vBldgFloor As String, _
ByVal vBldgName As String, ByVal vStreet As String, ByVal vSubdivision As String, ByVal vBarangay As String, _
ByVal vCityMunicipality As String, ByVal vProvince As String, ByVal vRegion As String, ByVal vPackage As String, _
ByVal vPromoCode As String, ByVal vPayType As String, ByVal vApplicationDate As DateTime, ByVal vPaymentDate As DateTime, _
ByVal vEndorsedDate As DateTime, ByVal vScheduleDate As DateTime, ByVal vActivationDate As DateTime, ByVal vPCDelivery As String, _
ByVal vNoPCAvailable As String, ByVal vDatePCPickUp As DateTime, ByVal vSalesAgent As String, ByVal vCoordinator As String, _
ByVal vSalesChannel As String, ByVal vSalesGroup As String, ByVal vCreatedBy As String, ByVal vloanStatus As String, _
ByVal vtimestamp As DateTime, ByVal vPCIssue As String) As Integer
Dim contDal As DAL
Dim param(37) As SqlParameter
Try
contDal = New DAL("Data Source=192.168.0.4;Initial Catalog=CYBERYA;Persist Security Info=True;User ID=cyberya;Password=Piso4minutes;MultipleActiveResultSets=True")
contDal.Open()
param(0) = New SqlParameter("@ID", vid)
param(1) = New SqlParameter("@srn", vsrn)
param(2) = New SqlParameter("@SRCode", vsrcode)
param(3) = New SqlParameter("@SRNumber", vsrnumber)
param(4) = New SqlParameter("@Status", vstatus)
param(5) = New SqlParameter("@CustomerName", vCustomerName)
param(6) = New SqlParameter("@HomeContact", vHomeContact)
param(7) = New SqlParameter("@BusinessContact", vBusinessContact)
param(8) = New SqlParameter("@MobileContact", vMobileContact)
param(9) = New SqlParameter("@LotHouseNo", vLotHouseNo)
param(10) = New SqlParameter("@RoomUnitStall", vRoomUnitStall)
param(11) = New SqlParameter("@BldgFloor", vBldgFloor)
param(12) = New SqlParameter("@BldgName", vBldgName)
param(13) = New SqlParameter("@Street", vStreet)
param(14) = New SqlParameter("@Subdivision", vSubdivision)
param(15) = New SqlParameter("@Barangay", vBarangay)
param(16) = New SqlParameter("@CityMunicipality", vCityMunicipality)
param(17) = New SqlParameter("@Province", vProvince)
param(18) = New SqlParameter("@Region", vRegion)
param(19) = New SqlParameter("@Package", vPackage)
param(20) = New SqlParameter("@PromoCode", vPromoCode)
param(21) = New SqlParameter("@PaymentType", vPayType)
param(22) = New SqlParameter("@ApplicationDate", vApplicationDate)
param(23) = New SqlParameter("@PaymentDate", vPaymentDate)
param(24) = New SqlParameter("@EndorsedDate", vEndorsedDate)
param(25) = New SqlParameter("@ScheduleDate", vScheduleDate)
param(26) = New SqlParameter("@ActivationDate", vActivationDate)
param(27) = New SqlParameter("@PCDelivery", vPCDelivery)
param(28) = New SqlParameter("@NoPCAvailed", vNoPCAvailable)
param(29) = New SqlParameter("@datepcpickedup", vDatePCPickUp)
param(30) = New SqlParameter("@SalesAgent", vSalesAgent)
param(31) = New SqlParameter("@Coordinator", vCoordinator)
param(32) = New SqlParameter("@SalesChannel", vSalesChannel)
param(33) = New SqlParameter("@SalesGroup", vSalesGroup)
param(34) = New SqlParamete
Member 10033107
6-Jun-13 8:22am
View
Deleted
okay this is the back end program hope you can make do some advice or help to fix my error as well ..
Public Function SubmitRawData(ByVal vid As Integer, ByVal vsrn As String, ByVal vsrcode As String, ByVal vsrnumber As String, _
ByVal vstatus As String, ByVal vCustomerName As String, ByVal vHomeContact As String, ByVal vBusinessContact As String, _
ByVal vMobileContact As String, ByVal vLotHouseNo As String, ByVal vRoomUnitStall As String, ByVal vBldgFloor As String, _
ByVal vBldgName As String, ByVal vStreet As String, ByVal vSubdivision As String, ByVal vBarangay As String, _
ByVal vCityMunicipality As String, ByVal vProvince As String, ByVal vRegion As String, ByVal vPackage As String, _
ByVal vPromoCode As String, ByVal vPayType As String, ByVal vApplicationDate As DateTime, ByVal vPaymentDate As DateTime, _
ByVal vEndorsedDate As DateTime, ByVal vScheduleDate As DateTime, ByVal vActivationDate As DateTime, ByVal vPCDelivery As String, _
ByVal vNoPCAvailable As String, ByVal vDatePCPickUp As DateTime, ByVal vSalesAgent As String, ByVal vCoordinator As String, _
ByVal vSalesChannel As String, ByVal vSalesGroup As String, ByVal vCreatedBy As String, ByVal vloanStatus As String, _
ByVal vtimestamp As DateTime, ByVal vPCIssue As String) As Integer
Dim contDal As DAL
Dim param(37) As SqlParameter
Try
contDal = New DAL("Data Source=192.168.0.4;Initial Catalog=CYBERYA;Persist Security Info=True;User ID=cyberya;Password=Piso4minutes;MultipleActiveResultSets=True")
contDal.Open()
param(0) = New SqlParameter("@ID", vid)
param(1) = New SqlParameter("@srn", vsrn)
param(2) = New SqlParameter("@SRCode", vsrcode)
param(3) = New SqlParameter("@SRNumber", vsrnumber)
param(4) = New SqlParameter("@Status", vstatus)
param(5) = New SqlParameter("@CustomerName", vCustomerName)
param(6) = New SqlParameter("@HomeContact", vHomeContact)
param(7) = New SqlParameter("@BusinessContact", vBusinessContact)
param(8) = New SqlParameter("@MobileContact", vMobileContact)
param(9) = New SqlParameter("@LotHouseNo", vLotHouseNo)
param(10) = New SqlParameter("@RoomUnitStall", vRoomUnitStall)
param(11) = New SqlParameter("@BldgFloor", vBldgFloor)
param(12) = New SqlParameter("@BldgName", vBldgName)
param(13) = New SqlParameter("@Street", vStreet)
param(14) = New SqlParameter("@Subdivision", vSubdivision)
param(15) = New SqlParameter("@Barangay", vBarangay)
param(16) = New SqlParameter("@CityMunicipality", vCityMunicipality)
param(17) = New SqlParameter("@Province", vProvince)
param(18) = New SqlParameter("@Region", vRegion)
param(19) = New SqlParameter("@Package", vPackage)
param(20) = New SqlParameter("@PromoCode", vPromoCode)
param(21) = New SqlParameter("@PaymentType", vPayType)
param(22) = New SqlParameter("@ApplicationDate", vApplicationDate)
param(23) = New SqlParameter("@PaymentDate", vPaymentDate)
param(24) = New SqlParameter("@EndorsedDate", vEndorsedDate)
param(25) = New SqlParameter("@ScheduleDate", vScheduleDate)
param(26) = New SqlParameter("@ActivationDate", vActivationDate)
param(27) = New SqlParameter("@PCDelivery", vPCDelivery)
param(28) = New SqlParameter("@NoPCAvailed", vNoPCAvailable)
param(29) = New SqlParameter("@datepcpickedup", vDatePCPickUp)
param(30) = New SqlParameter("@SalesAgent", vSalesAgent)
param(31) = New SqlParameter("@Coordinator", vCoordinator)
param(32) = New SqlParameter("@SalesChannel", vSalesChannel)
param(33) = New SqlParameter("@SalesGroup", vSalesGroup)
param(34) = New SqlParameter("
Member 10033107
6-Jun-13 4:59am
View
Deleted
Chill thanks for the response i dont have any error here i want to ask how i will create a parse string that deliminate long strings/value i dont have any experience to deal with such an error like this maybe you can help me through this thanks
Member 10033107
5-Jun-13 22:48pm
View
yes i already did sir
i suppose to type done here as a guide so in your thought it was a mistake .. im sorry
yet im trying already to figure out what do i need to adjust to fix the error Failed to convert parameter value from a String to a Int64. i believe i need to declare convertint64 to srn, srcode and srnumber?? as ive change to call already "id" so that my command will focus on one int..
Member 10033107
5-Jun-13 22:36pm
View
this is the code ive been working on
Dim strSql As String = "INSERT INTO tblsummaryImport ([id],[status],[SRN],[SrCode],[SrNumber],[CustomerName],[HomeContact],[BusinessContact],[MobileContact],[LotHouseNo],[RoomUnitStall],[BldgFloor],[BldgName],[Street],[Subdivision],[Barangay],[CityMunicipality],[Province],[Region],[Package],[PromoCode],[PaymentType],[ApplicationDate],[Endorseddate],[loanstatus],[PaymentDate],[ScheduleDate],[ActivationDate],[PCDelivery],[No.PCAvailed],[DatePCPickedUp],[SalesAgent],[Coordinator],[SalesChannel],[Salesgroup],[createdby],[timestamp]) Values(@id,@status,@srn,@customername,@homecontact,@businesscontact,@mobilecontact,@lothouseno,@roomunitstall,@bldgfloor,@bldgname,@street,@subdivision,@barangay,@citymunicipality,@province,@region,@package,@promocode,@loanstatus,@application,@paymenttype,@scheduledate,@activationdate,@pcdelivery,@nopcavailable,@datepcpickup,@salesagent,@salesgroup,@createdby,@timestamp)"
Dim SqlconnectionString As String = "Data Source=192.168.0.4;Initial Catalog=CYBERYA;Persist Security Info=True;User ID=cyberya;Password=Piso4minutes;MultipleActiveResultSets=True"
Using con As New SqlClient.SqlConnection(SqlconnectionString)
Dim cmd As New SqlClient.SqlCommand("Populatecsv", con) ' create command objects and add parameters
With cmd.Parameters
.Add("@id", SqlDbType.BigInt)
cmd.Parameters("@id").Value = ID
.Add("@srn", SqlDbType.VarChar, 50)
.Add("@srcode", SqlDbType.VarChar, 50)
.Add("@srnumber", SqlDbType.VarChar, 50)
.Add("@status", SqlDbType.VarChar, 500)
.Add("@CustomerName", SqlDbType.VarChar, 500)
.Add("@HomeContact", SqlDbType.VarChar, 500)
.Add("@BusinessContact", SqlDbType.VarChar, 500)
.Add("@MobileContact", SqlDbType.VarChar, 500)
.Add("@LotHouseNo", SqlDbType.VarChar, 500)
.Add("@RoomUnitStall", SqlDbType.VarChar, 500)
.Add("@BldgFloor", SqlDbType.VarChar, 500)
.Add("@BldgName", SqlDbType.VarChar, 500)
.Add("@Street", SqlDbType.VarChar, 500)
.Add("@Subdivision", SqlDbType.VarChar, 500)
.Add("@Barangay", SqlDbType.VarChar, 500)
.Add("@CityMunicipality", SqlDbType.VarChar, 500)
.Add("@Province", SqlDbType.VarChar, 500)
.Add("@Region", SqlDbType.VarChar, 500)
.Add("@Package", SqlDbType.VarChar, 500)
.Add("@PromoCode", SqlDbType.VarChar, 500)
.Add("@ApplicationDate", SqlDbType.DateTime)
.Add("@PaymentDate", SqlDbType.DateTime)
.Add("@EndorsedDate", SqlDbType.DateTime)
.Add("@PaymentDate", SqlDbType.DateTime)
.Add("@ScheduleDate", SqlDbType.DateTime)
.Add("@ActivationDate", SqlDbType.DateTime)
.Add("@PCDelivery", SqlDbType.VarChar, 500)
.Add("@NoPCAvailable", SqlDbType.VarChar, 50)
.Add("@DatePCPickUp", SqlDbType.DateTime)
.Add("@SalesAgent", SqlDbType.VarChar, 500)
.Add("@Coordinator", SqlDbType.VarChar, 500)
.Add("@SalesChannel", SqlDbType.VarChar, 500)
.Add("@SalesGroup", SqlDbType.VarChar, 500)
.Add("@CreatedBy", SqlDbType.VarChar, 500)
.Add("@loanStatus", SqlDbType.VarChar, 500)
.Add("@timestamp", SqlDbType.DateTime)
End With
con.Open()
Dim adapter As New SqlClient.SqlDataAdapter()
adapter.InsertCommand = cmd
'--Update the original SQL table from the datatable
Dim iRowsInserted As Int64 = _
adapter.Update(dt)
Try
cmd.ExecuteNonQuery()
Catch ex As System.Data.SqlClient.SqlException
Msg
Member 10033107
5-Jun-13 22:35pm
View
ron i already did what youve said to check open(); yet it works as well but an error calls out like this :Failed to convert parameter value from a String to a Int64.
Member 10033107
5-Jun-13 22:22pm
View
so what will id o or alternative command i will write?? it so unusual to see this because i already stated it O.o help..guys!! im almost near to finish this ^^
Member 10033107
5-Jun-13 22:20pm
View
so can you give any links or samples for that thing so i will fix that?? thanks for your response guys..
Member 10033107
5-Jun-13 22:18pm
View
ooh so how is thet like conn.open??
i already did that with this command so i was wondering why is that happen with the error
Dim mycommand As SqlClient.SqlCommand = New SqlClient.SqlCommand()
mycommand.CommandText = "INSERT INTO tblsummaryImport ([id],[status],[SRN],[SrCode],[SrNumber],[CustomerName],[HomeContact],[BusinessContact],[MobileContact],[LotHouseNo],[RoomUnitStall],[BldgFloor],[BldgName],[Street],[Subdivision],[Barangay],[CityMunicipality],[Province],[Region],[Package],[PromoCode],[PaymentType],[ApplicationDate],[Endorseddate],[loanstatus],[PaymentDate],[ScheduleDate],[ActivationDate],[PCDelivery],[No.PCAvailed],[DatePCPickedUp],[SalesAgent],[Coordinator],[SalesChannel],[Salesgroup],[createdby],[timestamp]) Values(@id,@status,@srn,@customername,@homecontact,@businesscontact,@mobilecontact,@lothouseno,@roomunitstall,@bldgfloor,@bldgname,@street,@subdivision,@barangay,@citymunicipality,@province,@region,@package,@promocode,@loanstatus,@application,@paymenttype,@scheduledate,@activationdate,@pcdelivery,@nopcavailable,@datepcpickup,@salesagent,@salesgroup,@createdby,@timestamp)"
myconnect2.Open()
Member 10033107
5-Jun-13 21:53pm
View
ok im wondering what do you mean in my statement of 500?? i believe that my size of the value for package and promocode also with other value i comment out.. do i need to remove it that's what i think on what you've said earlier
Member 10033107
5-Jun-13 21:44pm
View
HI Ron..on declaring the application date how do i declare date like yr/month/date with also same command here cmd.Parameters("@date").Value = date??
Member 10033107
5-Jun-13 21:35pm
View
i encounter this new error maybe can you help me int this one too.. thanks
Line 196: .Add("@Package", SqlDbType.VarChar, 500, "package")
Line 197: .Add("@PromoCode", SqlDbType.VarChar, 500, "promocode")
Line 198: .Add("@ApplicationDate", SqlDbType.DateTime, "applicationdate")
Line 199: .Add("@PaymentDate", SqlDbType.DateTime, "paymenttype")
Line 200: .Add("@EndorsedDate", SqlDbType.DateTime, "endorseddate")
Member 10033107
5-Jun-13 21:17pm
View
hey Andrew.. I will try this command lines thanks!! ^^
Member 10033107
5-Jun-13 21:13pm
View
Hi Ron! thanks for your response.. meaning i need to indicate the value already in my command?? wherein do you have any idea of add a data that expect new value? did you get my point? so there..
Member 10033107
5-Jun-13 5:47am
View
actually amit i used this source as my basis:
Protected Sub Button1_Click(sender As Object, e As EventArgs)
Dim item As GridDataItem = DirectCast(RadGrid1.Items(0), GridDataItem)
'accessing first grid item
Dim id As Integer = Convert.ToInt16(item("EmployeeID").Text)
Dim txtname As TextBox = DirectCast(item.FindControl("TextBox1"), TextBox)
Dim name As String = txtname.Text
Dim list As DropDownList = DirectCast(item.FindControl("DropDownList1"), DropDownList)
Dim user As String = list.SelectedValue
Dim con As New SqlConnection(WebConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString)
Dim cmd As New SqlCommand("INSERT INTO Employees (EmployeeID,FirstName,user_role) values(@EmployeeID,@FirstName,@user_role) ", con)
cmd.Parameters.Add(New SqlParameter("@EmployeeID", id))
cmd.Parameters.Add(New SqlParameter("@FirstName", name))
cmd.Parameters.Add(New SqlParameter("@user_role", user))
con.Open()
cmd.ExecuteNonQuery()
con.Close()
End Sub
for declaring my listview and change this code also for the output i want to imply to my project as well i called lvsummary as my listview id..so there.. i just open up this within my error.. yet within the lvsummary it indicates the items expect to my listview table wherein i was able to call those values using the database and they have all ready values in the database table and i also declare stored procedure.. and i dont know why is it still called an error .. im so confused already..
Member 10033107
5-Jun-13 4:13am
View
Ammit.. after i put your code the error called again.. why im a suppose to do?
Member 10033107
5-Jun-13 2:18am
View
amit, can you give me an example for this command because it expect end if statement
Member 10033107
5-Jun-13 2:08am
View
okay thank you i will try this command thanks again
Member 10033107
5-Jun-13 2:02am
View
and by the way what is CType that you call in your comment?? thanks
Member 10033107
5-Jun-13 2:02am
View
Hi Amit thanks for the reply,..
Lvsummary is the a listview id of my listviewtable wherein i want to call a value i posted for id..
Member 10033107
4-Jun-13 3:54am
View
bro i already test what youve been said yet the error message is like this "STRING is a classtype and cannot be used as an expression"
also
"." expected
Member 10033107
4-Jun-13 3:37am
View
yes some thing like that sir, yet there are some error because i do not state the string value, anyway with regarding to the string, does might have effect if the data sent has some null values?? can you give an example for that so i might clearly understand on what im going to do.. thank you again for the response
Member 10033107
4-Jun-13 3:21am
View
ok sorry im a newbie here.. by the way..(correct me if im wrong) within my statement i encode, i will state on the code like this: cmdtest.Parameters.Add(New Data.SqlClient.SqlParameter("@srn", Convert.ToInt64(srn)))?? because the scenario of my program will be they will input some data that i will add it to the database.. thanks for the response by the way
Member 10033107
4-Jun-13 3:16am
View
ok sorry im a newbie here..
by the way..(correct me if im wrong) within my statement i encode, i will state on the code like this:
cmdtest.Parameters.Add(New Data.SqlClient.SqlParameter("@srn", Convert.ToInt64(srn)))??
because the scenario of my program will be they will input some data that i will add it to the database..
thanks for the response by the way
Member 10033107
4-Jun-13 0:54am
View
those column are id,srn, srncode, srnumber and promocode which i address to bigint
Member 10033107
3-Jun-13 21:23pm
View
yes but how? i didnt get it because i set my stored procedure as bigint and why so sudden it has an error such as this i might still checking it out maybe you know or explain how it will be solved?
Member 10033107
30-May-13 23:46pm
View
<img src="http://i404.photobucket.com/albums/pp129/LoLnik/staging.jpg" border="0" alt=" photo staging.jpg"/>
Member 10033107
30-May-13 21:52pm
View
Okay guys.. this is what i want to create in the photo i posted lately,
i want to create a table wherein the header rows are status, w/loan, w/o loan and no code and with the status row indicates for loan approval, for payment, for installation etc.. i was worried for the values to construct for w/o loan, w/ loan and no code area because i will call a procedure using sql server by creating a stored procedure to count the status value for with loan, w/o loan and no code.. since i will using a table for displaying, can you help me to make the status row will not change any value ONLY the with loan, without loan and no code area.. i hope i make it clear anyway
Show More