SunQuest
 
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old November 17th, 2004, 01:49 AM
vmbs vmbs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 36 vmbs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 24 sec
Reputation Power: 4
Question drop column using vb

i need help for drop colum from table i wrote the below code but it give ERROR:timeout expire

i have one combobox and one button while selecting combox the selected column will drop by clicking the button

i have more than 29 columns in the table vmbs and all columns have an entry in the combobox
it is working with small tables but it will not work with large tables
what can i do plz reply soon

sub command1_click()

dim db as new adodb.connection

dim rs as new adodb.recordset

str=com1.text

db.open "dsn=jay"

set rs=db.excute("select * from vmbs;")

sql="alter table vmbs drop column [" & str & " ];"

db.excute sql

db.close

end sub

Reply With Quote
  #2  
Old November 17th, 2004, 06:19 PM
Lauramc's Avatar
Lauramc Lauramc is offline
SQL Slarentice
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2004
Location: In My Happy Place
Posts: 1,782 Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level)Lauramc User rank is General 2nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 15 h 42 m 2 sec
Reputation Power: 1081
Timeout Expired problem...

I used to run into this one and the way I solved it was to specify the timeout (in seconds).

On your command1_click() event, try adding the following at the beginning of your event code
(but after you dim db as new adodb.connection):

db.CommandTimeout = 300 'This is a five minute timeout.

I hope this helps, I used it a lot when dealing with a particularly busy SQL server.

Reply With Quote
  #3  
Old November 17th, 2004, 11:10 PM
vmbs vmbs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 36 vmbs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 24 sec
Reputation Power: 4
Quote:
Originally Posted by Lauramc
I used to run into this one and the way I solved it was to specify the timeout (in seconds).

On your command1_click() event, try adding the following at the beginning of your event code
(but after you dim db as new adodb.connection):

db.CommandTimeout = 300 'This is a five minute timeout.

I hope this helps, I used it a lot when dealing with a particularly busy SQL server.


-->dear sir i tryed like wise but it is not working after complition of 5 minits it show the same error
and one thing is my server is not that mutch busy it is very few data to access please tell how to solve

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > drop column using vb


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway