choudhuryshouvi 33 Posting Pro

Thanks for reminding me about this after 4 years...
The solution was simple but I had spent many sleepfull nights in finding that.. :)
Here is what I had done in solving this issue :-

The problem was, NODE5 was not recognized as a web-server in our intranet network. So what I did, just set my localhost as a webserver from LAN settings. Below are the steps :-

  1. Open Control Panel
  2. Goto Network Connections
  3. Here you will find your LAN connection name under "LAN or High-Speed Internet" section. In my pc, it was "Local Area Connection 4".
  4. Right click on it and goto Properties.
  5. Click on Advance Tab and then click Settings. The Windows Firewall dialog will popup. Though you can directly open it from control panel but still I am writing the exact steps I performed 4 years ago.
  6. In firewall dialog, goto Advanced tab.
  7. In the list of connections, under Network Connection Settings, select your LAN connection name (in my case, "Local Area Connection 4") and click Settings.
  8. The Advanced Settings dialog will open. Goto Services tab.
  9. In the list of services, you will find "Web Server (HTTP)". Also make sure that Port No. 80 is open and granted access in windows firewall (if its enabled).
  10. Check it and when the service settings dialog will open, mention the name of virtual web-server in your intranet network. It will take your machine name in default. You can keep it or you can also change name.
  11. Continue hitting …
pritaeas commented: Shared after four years, wow! +14
choudhuryshouvi 33 Posting Pro

inno setup is used to create new installer...

in my case, i already have it and also i donot have the setup script that inno setup requires to compile the setup program...this setup is from diff. source and unfortunately i lost the discs...

all i need to do is to burn the files in multiple dvds so that it can be kept in continuous manner...

thanks for your rply...

choudhuryshouvi 33 Posting Pro

Hello fellows,

I have some files which consists a setup program worth 11.1 gb in size.

I want to burn these files into multiple dvds. For example, 3 dvds having size of 4.7gb OR 2 dvds one can be 8.5gb in size and another one can be 4.7gb in size. Moreover, i want to burn these in continuous manner. So that during installation when dvd1 is finished, the pc will ask for next dvd in order to continue.

I tried using winrar to create the archive in 4.3gb sizes but in this case, during installation, i will have to first extract files from archives (in my hard-drive) and then can start installation, which I don't want.

I tried to create image from these files and burning to image recorder in nero express 7. But it can't create image of files more than 8.5 gb. Please suggest me ways on how to do that...

Thanks for any information in advance...
Regards Shouvik

choudhuryshouvi 33 Posting Pro

It seems like that program which does the authentication before st6unst.exe is called was is installed along with the actual program you are trying to uninstall...

thnks for your kind rply....yes you are right, the uninstaller program (which does the authentication) was installed with the program which needs to be uninstalled...but i think it doesn't an issue...because i already tried uninstalling it using this program and that time i was succeeded...all references were successfully deleted....this time i changed the uninstaller program just a little bit and added two features...(1) it should be executed if current windows user is a system administrator and (2) the uninstaller will proceed after an authentication where a password needs to be input...and then it calls the st6unst.exe...
only differences between the two versions of the uninstaller was these two features that i added later..the previous version of this program directly calls the st6unst.exe and there was no verification process...only these differences...

any help regarding this will be appreciated...

thanks and regards
Shouvik

choudhuryshouvi 33 Posting Pro

Hello all,

I have created the setup/installer for my application using the PDwizard. The installation is working all good (as its expected). For uninstallation, I have used a custom program (created by me) instead of directly calling the st6unst.exe. This program is called from both programs shortcut menu as well as control panel add remove programs option. Only requirement to use a custom uninstaller is to make it password protected and open access solely to system administrators. This program is also calling st6unst.exe but after verifying the password and sysadmin account. The uninstallation also is going good except one thing. It doesn't remove the application entry from add remove programs screen. I checked in the registry and found that my application entry for uninstall is still there inside the path : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ST6UNST #1...

It removed only when I manually removed the entry from control panel.

How to do this thing automatically so that the entry from registry for uninstaller will also be removed after the application is uninstalled...

Any help regarding this will be highly appreciated.
Thanks for any info in advance

regards
Shouvik (India)

choudhuryshouvi 33 Posting Pro

thnks for your kind reply....

this app is intended to be multi-user app but after confirmation from the client....though its a multiuser or single user, the sql server runtime will be installed on server only...not in every execution of the setup....

though i have not got the answer i was looking for...this will not help me to automate the setup process of sql server runtime...it has to be executed by the user
at any means which i not wanted....looks like i have to change my server configuration program to allow user to install the runtime...anyways if the exact one is not found then I will have to proceed with some other idea...

i have visited the page and download SQL Server Compact Edition Runtime (SQLServerCE31-EN.msi) only....let me know if some other component will also require to download as per my purpose...

i will proceed with the component u suggested and will let u know if i succeed with that...

as far as the change in source code of the setup program concerns, i think its best to get your hands off from further messing things up...:)

thanks for your help...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

Hello folks,

I beg your pardon if I have posted the thread in wrong forum. But my query is related to sql server and visual basic 6, so I thought posting it here rather from visual basic forum will help me getting most replies....

I have developed an client-server based application which uses classic vb(vb6) as the front-end and sql server as the backend. For cost reduction, I have used sql server 2005 express edition as the backend server for my project as this is a free version which is available from microsoft and developers are allow to re-distribute it with their setups.

All the works related to programming including testing have been done successfully. I have also created the setup for deploying the application on the client site using the default Package and Deployment setup wizard that ships with visual studio 6.0 enterprise edition. But the hurdle comes here now. As we know, the sql server has to be configured with the database so that the software can be able to communicate with it for data transmission. Now i want my client to get rid of manually configuring all these and for so I have wrote a program apart from the original application which will guide the user to configure the database. User just has to click some buttons and the server will be configured. Now for this the sql server express edition MSDE should also need to be deployed in the client site too.

choudhuryshouvi 33 Posting Pro

never mind about my figures...those are imaginary values....but your last post has opened my eyes...thnks for that....i will use this formula....

thnks for all your efforts....

regards
Shouvik

choudhuryshouvi 33 Posting Pro

again thnks for your reply....i will try the estimates you have mentioned....i dnt need to compute monthly profitability....so i will consider using first estimate only

though i have some confusion in my mind which i need to clarify here....

according to your first estimation, lets take an example....keep in mind this example is based on the flow maintained in my system :-

# purchase transaction : original car value : 80000
down payment : 15000
emi value (with interest) : 2500
no. of emi(s) (within this the full amount is expected to be fully recovered) : 24

now the vehicle is sold to one customer, so the sales transaction becomes
# sales transaction : original car value : 80000
down payment : 15000
emi value (with interest) : 2500
no. of emi(s) (within this the full amount is expected to be fully recovered) : 24

now there we have two points :-
1. no. of emi/ emi value/monthly emi payments from dealer side against the purchase of vehicle (which he made after purchasing the vehicle from some of his suppliers) is not maintained in the system as the dealer doesn't need this....so when any purchase is made, the original car value will be taken as the transaction amount against the same.

2. for sales, no. of emi/emi value/down payments/monthly emi payments will be taken care of. so when the customer purchases the vehicle, he only pays …

choudhuryshouvi 33 Posting Pro

hello fortinbra....first of all thnks for your quick reply...really appreciated it

i should explain you a few things...

# first of all, i need to generate the profit/loss based on the scenario i mentioned here only...forget what the outside world says or whatever flow is followed in other systems....as i already mentioned this system is meant for retail dealers only who run small and middle size showrooms..not for wholesale dealers....

# u mentioned overheads which signifies cost for the dealer for making purchase of vehicles and prepare the same for sales.....for your kind information, there is no facility of maintaining overhead costs in this system...actually this system is built under supervision of a dealer who doesn't require maintaining overheads....so (d) will never come in the picture...

# so to generate the profit, i have to reply on (a) and (b) only...

purchase of a vehicle and sales made through out the year....each transaction posses original value of the vehicle and a down payment that has to pay when selling is carried out....now for (a)-(b), which amount should i undertake...the cumulative sum of original car value or the sum of down payments....

again each month customers pay the emi...which is also income against the sale of vehicle to the dealer....should this be taken into account or not...

further comments/reply regarding this will be appreciated....

thnks once again for your reply...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

Hello,

I am creating an automobile finance system for retail bike dealer. The system contains features using which inventory, purchase, sales and party (customers, suppliers, manufacturers, financers) details can be maintained.

Here inventory indicates to vehicles only which can be two wheeler, three wheeler and four wheeler. A lot of information is used to store with inventory, among these the following are crutial :-
1. car value, 2. down payment, 3. no. of EMI(s) and 4. EMI value.
(here EMI means Equal Monthly Installment)

when purchases are made inventory gets increase by qty and on sales it decreases as it normally should.

all these are working great and the system is also doing fine. the system is almost ready but I've stucked in a point where i need to generate a report based on vehicle wise profitability. i am using crystal report for reporting services.

the payment procedure in this system is as follows :-

1. customer buys the vehicle of his/her choice paying a lumpsum amount as down payment. the actual value of the vehicle, no. of emi(s) and emi value have been stored in inv. master and these all are getting stored when the sales invoice is created.

2. after this,customer pays only emi month by month to clear the rest of amount. details of emis such as no. of emi (which the customer is currently paying), its value, due date , payment date, latefine (if customer pays the …

choudhuryshouvi 33 Posting Pro

> is there any option available in the web.config file for disabling caching

Configure the OutputCacheSection. It is used to configure app-scope settings. Have a look at MSDN article - Cache Configuration in ASP.NET

thnks for the link....though i have visited it earlier before posting the question but not found anything that can work for me....but now i have found something regarding outputcache section in the msdn article.....will try that thing out and will reply here as soon as i get any result...

in the mean time, thnks for all the info.....

choudhuryshouvi 33 Posting Pro
Response.Buffer=<SPAN style="COLOR: blue">true;<o:p></o:p>
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
Response.Expires =-1500;
Response.CacheControl = "no-cache";

thanks for your quick reply...i know these...what i want is to disable caching in folder or application level...like using any settings in the web.config file or global.asax.file....somewhere i read this can be done using global.asax file but dnt know how to implement that....please help in this regards only.....

thnks once again...

choudhuryshouvi 33 Posting Pro

Hello there,

Is there any way of disabling caching of asp.net pages in folder or application level.... meant to say, is there any option available in the web.config file for disabling caching...i have done by using page wise...but need to disable caching for all pages in my application...

plz help me on how to disable caching for all asp.net pages at a time...

thanks for any help provided.

regards
shouvik

choudhuryshouvi 33 Posting Pro

Hello all,

we have a vb.net windows appliacation that uses sql server as backend. we have created all reports for this application using crystal report that is embedded in visual studio 2005. everything is working fine except the reports specially which needs to be displayed is custome mode. we have used some code to dynamically set the printer settings because at runtime the original printer settings are unknown and we don't want to let user set printer settings manually everytime before taking the printout. so the question is, how to set a custom papersize programactically. here is the code snippet that we have used to set some printer settings in runtime :-

rpt.PrintOptions.PrinterName = Configuration.ConfigurationManager.AppSettings("DefaultPrinter")
rpt.PrintOptions.PaperOrientation = PaperOrientation.Landscape
rpt.PrintOptions.PaperSize = PaperSize.PaperFanfoldUS

we have used reportdocument object to set printer options. we have two rpts which need to displayed in custom paper format. the formats are like 9X6 and 14X12. we have created these formats in server properties. now how to to set this from code? like in place of

rpt.PrintOptions.PaperSize = PaperSize.PaperFanfoldUS

.....some sort of syntax which will let us to put the papersize in place of PaperSize.PaperFanfoldUS...

hope i have explained the topic properly.....looking forward to any positive replies...any help/suggesstion or link to any resources will be greatly appreaciated....

thanks to all in advance...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

At last i have managed to solve the issue......thanks to all who have viewed or replied to my request.....finally THIS THREAD IS SOLVED AND NOW CLOSED....

Thanks and Regards
Shouvik :)

choudhuryshouvi 33 Posting Pro

Thanks buddy for your reply....but for your kind information, this issue is not as simple as you thought and replied in that context.....if just changing default home page could work, i wouldn't post any silly and stupid question like this here......i think you haven't understood my problem....anyways for your consideration i am making a brief here....

no the website is not set as default home page in both of my browsers....IE has blank and firefox has google.com (which was set by me).....apart from this, i have already blocked that site...but that doesn't what i need to....

its blocking the site but NOT PREVENTING THE BROWSER FROM OPENING IT....u understand it???....whenever i connect, the browser(default) is opening but it can't display the site as i blocked it....but what i want that whenever i connect no browser will open....that is all what i wanted to do....hope i have clarified it this time properly...

anyways thnks for ur rply....get me back with ur handly suggestions if u get anything on ur side...

thnks and regards
Shouvik

choudhuryshouvi 33 Posting Pro

Hello all Folks,

Its been a long time since I am posting something here. My problem is, when I am connecting my computer to the internet, the website of my ISP is opening. Every time I connect to the internet, this site is opening which is now really making me irritating. I don't want to open that thing. So how can I prevent my browser from completely opening that site?

I have tried restricted sites and content advisory settings in Internet Explorer. Also I have tried modifying windows host file. But nothing is working fully as what I want. Its blocking the site but not preventing the browser from opening it.

What I want is to stop my browser to open that site whenever I connect to the internet. I just don't want to see my browser opened up. I want it will open only when I click on the option. That's all.

I hope some positive response will come in my way. Waiting for some quick response.

P.S. I have two browsers in my pc currently. Internet Explorer 6 and Mozilla Firefox 3.6 (with persona)

Thanks for all the suggestions in advance...

Regards
Shouvik

choudhuryshouvi 33 Posting Pro

yes of course it is possible....just put your access database on a centralized machine being connected in a local area network...make sure the file is shareable and that's it....just create a shortcut or install your client software in all the nodes from which you want to connect the database...its very easy...all the nodes in the same network as the host computer is(where your db is located) should access the database without any problem....thats all you have to do.....also make sure that your network has sufficient permissions for file sharing and the database also has read-n-write access...

hope this will sort out your query...let me know if this gets well for you...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

choudhuryshouvi - about Project.zip.

Is this for Standalone VB6 or is it part of the Microsoft Access Userform.

If standalone program, does it extract the information from mdb files. If so, then I could use it on any Access database. Correct?

I haven't unpacked it yet. I wanted to clarify the use of the vbp project and its relation to Access. I have Access 2003 but I'm not a fan of it.

1. this is a standalone vb6 program using ms access as its back-end

2. yes, it can extract information from mdb files. but its capability is limited to access 2000 databases only. because this program was developed based on DAO object library which could not read access files which is more than 2000. if you want to read access 2003 databases using this program then you have to use ADO library and ofcourse need to convert the syntaxes accordingly.

3. whether you have access 2003 or access 2007, it doesn't matter any. but one disadvantage is, you cannot use any new database that you may have created using access 2003 and bind it with this program.

Hope that you have got answers to all of your questions.

regards
Shouvik

choudhuryshouvi 33 Posting Pro

your intension is not clear from your explanation....plz explain it in more detail...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

it seems that u have already benefited.....have u got ur answer...

if yes then please mark this thread as SOLVED

choudhuryshouvi 33 Posting Pro

i'm new programmer. can u help me , how to retrieve data from database(access) and display in combo box. the value in combo box will automatic display into text box
example:
dtbs=office.mdb
table name= item
field name=itemID,itemName
itemID=M1; itemName=modem
itemID=M2; itemName=repeater

i want this combo box display all itemID in combo box. if the user choose/click, M1, text box will display 'modem' automatically....
how to do like that???plzz help me.....

think thats the complete code for you....take a combo box and a textbox...

set properties :-

combox box : name --> cboItem
style --> 2- dropdown list
textbox : name --> txtname

add this reference in the project --> Microsoft Activex Data Object <version no.> Library.......the version no. depends on the version of ms office u have installed.....take the highest one for better performance....

here we go...

Option Explicit

Dim gcn As New ADODB.Connection

Private Sub cboItem_Click()
Dim rs As New ADODB.Recordset

With rs
    .CursorLocation = adUseClient
    .LockType = adLockOptimistic
    .CursorType = adOpenDynamic
    .Open "select itemname from [item] where itemid='" & cboItem.List(cboItem.ListIndex) & "'", gcn

    txtname.Text = IIf(.RecordCount = 0, "", IIf(IsNull(!itemname), "", !itemname))
End With

If rs.State = adStateOpen Then rs.Close
Set rs = Nothing
End Sub

Private Sub Form_Load()
On Error GoTo err1

gcn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sample.mdb;" & _
                    "Persist Security Info=False"
gcn.Open

Call PopulateCombo

Exit Sub

err1:
    Err.Clear
    MsgBox "Could not open database.", vbCritical, "Error"
    If gcn.State = adStateOpen …
choudhuryshouvi 33 Posting Pro

243 views and still no replies...come on guys....please help me out in this....and just give me some links from where i can get some tips regarding this matter...please please help me....

choudhuryshouvi 33 Posting Pro

Hello all folks...

I have an asp.net web application which uses Microsoft Sql Server 2000 as its backend....Our application is a Payroll Management System..

The system is fully completed and uploaded to the local server in our client offices....The system is build on WinXp platform...the apps is running in the client side on a Win2000 professional Sp4 platform...the server is an IIS server....the system is running on a local intranet network....but I think this isn't an issue...coz the system is successfully installed there and running....The problem is related with Login.....When I run the same application from VS2005 IDE, its running smoothly and there is no problem at all....The problem is arising when I'm running the application from IIS server....in the login page we have a code logic like this on the page_load event call...

if (Session["User"] != "H")
        {
            Response.Redirect("~/master/login.aspx");
        }

the purpose for using the above code is to prevent any user from using any of the modules if the session variable expires....I have set the session timeout for 20 minutes in the web.config file...there is a login page in the application...when an user is loggin in, I'm storing a value "H" in the session variable "User"......so after login when the user opens any page, the system checks for the session value....if it not finds the value then natually redirecting to the login page....but this has to be happened if the session expires after 20 mins and it will only happen if there will be …

choudhuryshouvi 33 Posting Pro

are you out of your mind?
what else someone understand from just a scratch.....you have just post a form...what could someone understand from this....

if you really want some solutions....if u really need...then post your fullcode..

choudhuryshouvi 33 Posting Pro

item cannot be found in the collection corresponding to the requested name or ordinal --> this means you donot have a column with name "supplier_name" in the table...

check the sql statement...whether you are opening the correct table or not...
the table must have the column "supplier_name" in it....

for better observation please upload your full code here....

regards
Shouvik

choudhuryshouvi 33 Posting Pro

try the code in the attachment...

hope this becomes useful...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

Well it's very clear as the sunshine. You have just used the "rs" but not declaring/setting it.

that's true....he forgot to create an instance....but already fixed that...
he..he.

choudhuryshouvi 33 Posting Pro

hi....here is the modified code...just check this out....look for the BOLDED lines....these are where i made some changes....watch GREEN lines for comments....

the problem is within your listview manipulation code.....means when you are adding listitems.....you have mismatched total no. of columns and listitems.....total no. of columns in the listview should match with total no. of listitems you want to add....the problem is you adding 5 listitems to the control where you are having only 3 columns....so that's why the error is coming....

just follow this code and hope you will solve ur problem...

Dim con As ADODB.Connection
Dim rs As ADODB.Recordset
Dim listitem As listitem

this is for adding the columns to the lv control
[B]Dim colx As Columnheader[/B]
this is for measuring column widths
[B]Dim colWidth As Double[/B]

Private Sub Form_Load()
Set con = New ADODB.Connection
con.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=\\asfserver\itp$\Product_tabletest.mdb")

Set rs = New ADODB.Recordset
[B]rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic[/B]

StrSql = "Select"
StrSql = StrSql & "[supplier_name],[type],[fax_no],[contact_person] from [Supplier]"

[B]rs.Open StrSql, con[/B]
   
ListView1.View = lvwReport

checking the width of listview control and divided by 5...so that all columns become of same width...here we used 5 because the control will have 5 columns
[B]colWidth = ListView1.Width / 5[/B]

here we are adding the columns
you need similar no. of columns as much no. of listitems you want to add to the listview. now if you want to hide any column from displaying, just set its width to 0.
[B]With ListView1
    .ColumnHeaders.Clear …
choudhuryshouvi 33 Posting Pro

your code has some problems that I noticed....anyways this code can be improved...but could you explain what is happening actually when you running this?

what's d error msg you are getting....what's the output coming?

regards
Shouvik

choudhuryshouvi 33 Posting Pro

The Microsoft Windows Common Control 6.0 is already checked and I only got 1 Primary key each table. It is there in the zip. . .

the sample code that i gave you also contains one primary key in the database....so there is nothing wrong with the code or the database structure....this code is running absolutely ok in my system....the errors that you snapped in is completely system related....it is not related with your code....not logically or not in compilation level...

make sure that you have referenced "microsoft windows common control 6.0" and "microsoft windows common control 6.0 (sp3)" in your project->components list..

the reason for these errors are....this code uses two controls "datepicker" and "listview" which are included in "microsoft windows common control 6.0" and "microsoft windows common controls 6.0 (sp3)" components...so unless you register and add these into your project, the code won't compile....

i hope you understood the logic behind the errors now....so just do it and get me your feeds when you are done...

and ofcourse whether your table contains one primary key or more than one, that doesn't be a matter at all....coz according to your database this code was written in such a way that you won't face any problem in case if you accidentally inserts any duplicate value to primary key field...there is a validation for checking duplicate value already in the code....so just proceed with it....

regards
Shouvik

choudhuryshouvi 33 Posting Pro

that will be simply great and becomes more acceptable...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

did you register the activex components as I said...

if yes then goto project->components and check on "Microsoft Windows Common Control 6.0" and click ok....

nagatron commented: thank you so much friend for helping me =) +1
choudhuryshouvi 33 Posting Pro

okk......check out this code now...
i think this time it is 100% OK...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

hallo friend, I have tried your code about the case sensetivity. I works great but there's a little bit problem. If I input like this:

Input1:
Event Name: Fieldtrip --------------------> (primary key)
User: Neil
Schedule: 1/20/09

Input2:
Event Name: Tour --------------------> (primary key)
User: Neil
Schedule: 1/20/09

Where the event name is my primary key in the database. It results an error if "User" and "Schedule" in input1 and input2 are the same. I was expecting that there will be no error coz my primary key is "Event Name" not the user or schedule. "some error occured..." this message will appear. But if I input another entry in input2 like:

Input2:
Event Name: Tour --------------------> (primary key)
User: James
Schedule: 1/21/09

This works fine.

can you upload your database(only) here...so that i can investigate.....according to the code...there is not a single line of error at all....i have tested it several times....but i tested it with a sample database....ofcourse your db structure is 100% diff. than this...so if you give me the actual database i can check for the error more thoroughly........now the choice is yours...

btw thanks for using the code and for urs feedback...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

These are the errors I see in the sample you sent to me. I was not able to view the running part. =) I will try to understand your code.

what did you mean by this --->

I was not able to view the running part

did u mess up with vb???....it seems that some of your activex files (.ocx) are missing.....the snaps that you are attached are fully system related....these are not related to the program at all....to avoid getting this error you have the following options :-

1. uninstall and then re-install vb
2. just register "mscomctl.ocx" and "mscomct2.ocx" in your system...
might be you are not familer with registering activex controls manually...so i'm giving you the steps :-

1. if you haven't yet messed up with vb, you will have these two ocx files in your "system32" directory of your root drive..
2. use the command --> regsvr32 <ocx file name> to register the files...like to register "mscomctl.ocx" you must type....

regsvr32 mscomctl.ocx....similarly....for the other one
regsvr32 mscomct2.ocx..........issue this command from start->run

just register these two ocx files and the errors will be simultaneously solved....

if you donot have these files...just download from net....these are freely distributable and available for download...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

Hello.......i have attached the sample code...
just check this out....and get me your feedback...

hope this will be useful for you...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

you have done some mistakes in the code....do the modifications as I mentioned...

in the function definition change

rst.Open "select * from event where eventname='" & [B]Trim(txtEName)[/B] & "'", gcn

to the following ...

rst.Open "select * from event where eventname='" & [B]Trim(evtName)[/B] & "'", gcn

in your cmdAdd_click() change the entire code...like the following...

Private Sub cmdAdd_Click()
dim rst as New ADODB.Recordset

on error goto chec

If IsEventExists(txtEName.Text) = True Then
    MsgBox "Event Name Already Exist. Type a new one", vbInformation, "Duplicate Event"
    txtEName.SetFocus
    exit sub
endif	

rst.CursorLocation = adUseClient
rst.CursorType = adOpenDynamic
rst.LockType = adLockOptimistic

if rst.state=adstateopen then  rst.close
set rst=nothing

rst.open "select * from event",con,1,2
rst.AddNew

rst!fnumber = StrConv(txtFNumber, vbProperCase)
rst!eventname = StrConv(txtEName, vbProperCase)
rst!fname = StrConv(txtFName, vbProperCase)
rst!fincharge = StrConv(txtFIncharge, vbProperCase)
rst!fschedules = StrConv(Text2, vbProperCase)
rst!fschedulee = StrConv(Text3, vbProperCase)
rst!sitcapacity = StrConv(txtCapacity, vbProperCase)
rst!userschede = StrConv(Combo4, vbProperCase)
rst!userscheds = StrConv(Combo3, vbProperCase)
rst!fuser = StrConv(txtFUser, vbProperCase)
rst!destination = StrConv(txtDestination, vbProperCase)
rst!condition = StrConv(cboCondition, vbProperCase)
rst!enddate = dtpDate(0).Value
rst!startdate = dtpDate(0).Value
rst!transaction = StrConv(cboTransaction, vbProperCase)
rst!fsh = StrConv(txtfsh, vbProperCase)
rst!ush = StrConv(txtush, vbProperCase)

rst.Update
if rst.state=adstateopen then  rst.close
set rst=nothing

Label20.Caption = "Successfully Saved. . ."
Call dload2

exit sub

chec:
err.clear
msgbox "some error occured..."
txtEName.SetFocus
exit sub	
End Sub

try this and get me your feed...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

you are welcome...
hv a nice day...

choudhuryshouvi 33 Posting Pro

If the name already exits in the database, the message "Event Name Already Exist. Type a new one" will supposedly appear. But it only works if I input "Neil" but if I input "neil" or "NEIL", error message appear, "you can't store item because it's already exist in the database" then the 3 buttons appear "end, debug and the 3rd one (i forgot the name) will appear. What do you think is wrong with the code? Why is it this message (Event Name Already Exist. Type a new one) will not appear if I input the same name but with different letter case?

All I want is no matter what case you use, the message "Event Name Already Exist. Type a new one" should appear if it exist in the database. . .help me, thank you so much.

well....frnd...msaccess doesn't care for case at all....whether you use uppercase or lowercase or mixmatched letters....msaccess recognizes all as same....but to avoid getting this error you can modify your code....just a sample here....you can check this out...

just write a private function with return type of boolean, pass the event name which you need to check for duplication as parameter

now on a button_click event, accept an event name from a textbox, call the function and if it returns true then show your msg....that's it....so simple...

Private Function IsEventExists(ByVal evtName As String) As Boolean
Dim gcn As New ADODB.Connection
Dim rs As New ADODB.Recordset

On Error GoTo err1

If gcn.State …
choudhuryshouvi 33 Posting Pro

try to remove the :

With BooK_Details
end with

why to remove that??? there is no error at this syntax at all....

choudhuryshouvi 33 Posting Pro

so how will i display in the MSFlexGrid all the dates I selected in the dtpicker? if I choose 1/25/09, all 1/25/09 will display in the MSFlexGrid.

okk...it seems that my last post was not in vain...wasn't it???

one thing i must ask you...why are you using msflexgrid to display data from database instead of using listview control.....though listview is the most flexible control than flexgrid and populating a lv rather than a fg is so much easy....just an asking...ultimately the choice is yours...

kkk....the following is a sample code you can use to populate a fg :-

rs.Open "select * from info order by website", gcn

MSGrid.Rows = 1
MSGrid.Cols = 2
[B]MSGrid.FormatString = "  Website    |   UserName   |   Password    |   Referenced By"[/B]

MSGrid.Rows = 1

If rs.RecordCount > 0 Then
    rs.MoveFirst
    While Not rs.EOF()
        rowVal = rs!website & vbTab & rs!username & vbTab & rs!password & vbTab & rs!ref_id
        MSGrid.AddItem rowVal
        rs.MoveNext
    Wend
End If

If rs.State = adStateOpen Then rs.Close
Set rs = Nothing

where rs is the recordset and gcn is the connection object respectively....you can replace these with your own...

the 1st line is the query to fetch data from your database....change the statement according to your suits....

look at the bolded line....this is string for creating headers for your flexgrid control....change this accordingly....

and finally...check the line marked in red....this is the string for constructing a row value for fg and finally inserting to the grid...

hope …

choudhuryshouvi 33 Posting Pro

My actual connection is DSN. so do i have to write the code differently to connect my databse to ListView1..?

whether you use DSN or DSN-Less connection, there is no need to write additional code for connecting lv with the database....just pass the connection string in form_load event, open the connection....make sure the you are using a global connection object....and that's it.....one global connection object will handle connecting to the database and this applies to all databound controls on your form....just make sure that the connection object is opened till you close the project....that's it...nothing else to do...

but you have to make sure that the DSN must exist in the ODBC admin. before you try to connect through your code....and ofcourse the connection string should differ in case of DSN connection rather that DSN-Less connection....

regards
Shouvik

choudhuryshouvi 33 Posting Pro

see there are many reasons for which you can get error 424...
for example,if u mistyped a control name which is not exist at all in your project aka form....or any dependencies like any external components that you referenced previously in your project but which is not exist presently....you might have uninstalled that from your system.....or you have used some variables in your code for which you haven't mentioned the correct datatype....

according to you....this problem can arise from your listview control....make sure that you typed the correct object name for the lv in your code.....lets say...in the code you have used listview1...make sure that you have the control on your form with object name "listview1".....otherwise the compiler won't recognize that...

or it will be more better...if you posted the actual ping point of your code where you are getting the error....may be post the full code if possible.....coz accroding to the code there is no error at all...but there seems to be some other error in the code...but for that the code needs to supervised...

now the choice is yours....

regards
Shouvik

choudhuryshouvi 33 Posting Pro

first of all, your question is not clear at all...
you need to be more specific on what are you trying to accomplish...and please check your english....

okk....now for the coding purpose....you can use this code to add any customized value to a read-only combo box and assign the text of combo box to the newly added value...

with combo1
.AddItem text1.text
end with

combo1.text=Text1.text

keep in mind...you have to first add the new value to the combo box collection and then only you can assign it as current selection of value in the combo box...

there are also more alternative options...but try this one first....and get a feedback on what you got finally...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

i have 2 table in my database access 1 is temporary and the second one is temporary2, how can i save all the data in temporary to temporary2? im using adodb.

try this code...

rs.Open "select * from temporary1", gcn

gcn.Execute "delete from temporary2"

If rs.RecordCount > 0 Then
    rs.MoveFirst
    While Not rs.EOF()
        gcn.Execute "insert into temporary2(roll,name,address) values('" & rs!roll & "','" & rs!Name & "','" & rs!address & "')"
        rs.MoveNext
    Wend
End If

If rs.State = adStateOpen Then rs.Close
Set rs = Nothing

where gcn is the connection and rs is the recordset object respectively....replace these with your objects....

check out the statement which is marked as red...this is the sql statement you need to modify according to the fields you have in your tables....this statement will extract one row from temporary1 table and insert it to temporary2 table...

hope this helps....get me a feedback if this works out...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

what's the exact error msg you are getting????
can you be more clear on this....

choudhuryshouvi 33 Posting Pro

why you are using calender or month view.....???
its just a matter of selecting a date only...you can easily use the date picker control in vb....there is already a one in there for your use....just add the Microsoft Windows Common Control 2 6.0 from components list and use the datepicker control....

well now for the coding part....
you can easily use datepicker to query your database to get data filtered by a selected date...but the coding differs on the nature of the database...

if you use any local database like "msaccess", the sql should be-->

"select * from <table name> where doj=#" & format(dtpicker1.value,"MM-dd-yyyy") & "#"

where "dtpicker1" is the name of your datepicker control...

if you use any server side rdbms like sql server or oracle, the sql should be :-

"select * from <table name> where doj='" & format(dtpicker1.value,"dd-MMM-yyyy") & "'"

now the choice is yours....try any one of these and get me a feedback if this works out...

regards
Shouvik

choudhuryshouvi 33 Posting Pro

check out the bolded part of your code...i just mentioned the point where the code needs to be modified...

With BooK_Details
    [B]set li = .ListItems.Add(, , (rs!Acc_No))[/B]
End With

get me a feedback if this works out...

regards
Shouvik