add checkbox column to access table (was "SQL query help.., please, any one??")


good people of this forum..

I am working on an eccess db, and using asp to update, change and so on...
I want to add dynamicly a field to the db, using the ALTER TABLE command, but for some reson I can't find a way to make it work, the field type I am trying to add is boolean, and I want it to show up in the actual db as a checkbox, and not as a bit field (0/1), so I've been trying this and non of them work, and I couldn't find any sites with examples for this... any help would be very appricated..., this is what I've tryed so far and didn't work:
"ALTER TABLE [Users] ADD [CHILD] boolean"
"ALTER TABLE [Users] ADD [CHILD] boolean False"
"ALTER TABLE [Users] ADD [CHILD] boolean(f)"
"ALTER TABLE [Users] ADD [CHILD] boolean f"

me out on this\t

Posted On: Friday 26th of October 2012 12:02:47 AM Total Views:  341
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




How to use sessionState mode="SQLServer" at GoDaddy grid hostin

i saw some godaddy worker replied post at this forum so i wanna register and try to get help from here if you know how to use this sessionstate mode at goddady pls let me know i need syntax
VIEWS ON THIS POST

125

Posted on:

Wednesday 7th November 2012
View Replies!

Site on new GoDaddy server very slow? (.ASP)

adxtactical.net Here is the situation; We currently have the website running at adxtactical.com just fine with the SQL database at the old Hosting Company... We purchased a Virtual Plan with GoDaddy.com, and I plugged in the adxtactical.NET domain temporarily to the Virtual Server until everything is running flawlessly - then I will switch it over to .com on the new server. Notice now when you go to adxtactical.net, the site is VERY slow and whenever you click on a link, it takes 6-7 seconds longer then the site does at the other hosting company Where should I look first in finding a solution to this It's driving me crazy!
VIEWS ON THIS POST

140

Posted on:

Wednesday 7th November 2012
View Replies!

add database to server

I am writing an ASP page on my computer running win98 with pws .the connect to the database in acceess its very good (with the ODBC). but how i can put oll my site with database in this server with html and js its ok but,with the asp ,database how i can do this.in my computer after setting ODBC and driver of microsoft access evrything good .helppppppppppppppppppppppppp
VIEWS ON THIS POST

198

Posted on:

Wednesday 7th November 2012
View Replies!

Problem with adding to database

, When I try to add a new record using the following script I get this error: ADODB.Recordset error '800a0cb3' Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. /newsigning.asp, line 81 Here is the code: Code: strSQL = "select * from user_info where userid = "& session("userid") &"" SET rs1 = adoconn.EXECUTE(strSQL) if(Request.QueryString("action") = "update_activity") then actid = request.form("actid") compid = Request.Form("company_id") order_no = Request.Form("job_code") contact = request.form("company_contact") uid = session("userid") co_area = Request.Form("company_area") co_ex = Request.Form("company_exchange") co_num = Request.Form("company_number") co_ext = Request.Form("company_ext") fname = Request.Form("first_name") lname = Request.Form("last_name") co_fname = Request.Form("co_first_name") co_lname = Request.Form("co_last_name") p_area = Request.Form("p_area") p_ex = Request.Form("p_exchange") p_num = Request.Form("p_number") w_area = Request.Form("w_area") w_ex = Request.Form("w_exchange") w_num = Request.Form("w_number") m_area = Request.Form("m_area") m_ex = Request.Form("m_exchange") m_num = Request.Form("m_number") primary_phone = Request.form("primary_phone") address1 = request.Form("address_1") address2 = request.Form("address_2") city = request.Form("city") state1 = request.Form("state") zip = request.Form("zip") country_id = request.Form("county") appmonth = request.Form("month") appday = request.Form("day") appyear = request.Form("year") apphour = request.Form("hour") appminute = request.Form("minute") appampm = request.Form("am_pm") appdatetime = appmonth & "/" & appday & "/" & appyear confirmed = request.Form("confirmed") fee = request.Form("fee") notarizations = request.Form("notarizations") od_begining = request.form("od_begining") od_end_leg = request.Form("od_end_leg") od_end_rt = request.Form("od_end_rt") inb_doc_delivery_id = request.Form("inb_doc_delivery_id") delivery_company_id1 = request.Form("delivery_company_id1") tracking_num1 = request.Form("tracking_num1") delivery_company_id2 = request.Form("delivery_company_id2") tracking_num2 = request.Form("tracking_num2") comments = request.Form("comments") notes = request.Form("notes") updsql= "update activities set compid = "& compid &", order_no = '"& order_no &"', contact = '"& contact &"', co_area = "& co_area &", co_ex = "& co_ex &", co_num = "& co_num &", co_ext = "& co_ext &", fname = '"& fname &"', lname = '"& lname &"',co_fname = '"& co_fname &"', co_lname = '"& co_lname &"', p_area = "& p_area &", p_ex = "& p_ex &", p_num = "& p_num &", w_area = "& w_area &", w_ex = "& w_ex &", w_num = "& w_num &", m_area = "& m_area &", m_ex = "& m_ex &", m_num = "& m_num &", primary_phone = '"& primary_phone &"', address1 = '"& address1 &"', address2 = '"& address2 &"', city = '"& city &"', state = '"& state1 &"', zip = "& zip &", country_id = "& country_id &", app_date = '"& appdatetime &"',app_hour = "& apphour &", app_min = "& appminute &", app_ampm = '"& appampm &"',confirmed = '"& confirmed &"',fee = "& fee &", notarizations = "& notarizations &", od_begining = "& od_begining &", od_end_leg = "& od_end_leg &", od_end_rt = "& od_end_rt &",inb_doc_delivery_id = "& inb_doc_delivery_id &", delivery_company_id1 = "& delivery_company_id1 &",tracking_num1 = "& tracking_num1 &", delivery_company_id2 = "& delivery_company_id2 &", tracking_num2 = "& tracking_num2 &", comments = '"& comments &"', notes = '"& notes &"', actdate ='"& date &"' where actid = " & actid & "" 'response.write(updsql) 'set rs = server.createobject("ADODB.Recordset") 'set rs = adoconn.Execute(updsql) 'Set RS = Nothing 'Response.Redirect("calendar.asp") set rs = server.createobject("ADODB.Recordset") strSQL = "select * from activities where actid = " & actid & "" 'set rs = adoconn.Execute(strsql) rs.open strSQL,adoconn,2,3 if not rs.eof then 'rs.AddNew 'rs("actid") = actid 'rs("userid") = uid rs("compid") = compid 'if trim(order_no) "" then rs("order_no") = order_no 'end if 'if trim(order_no) "" then rs("contact") = contact 'end if if trim(co_area) "" then rs("co_area") = co_area else rs("co_area") = NULL end if if trim(co_ex) "" then rs("co_ex") = co_ex else rs("co_ex") = NULL end if if trim(co_num) "" then rs("co_num") = co_num else rs("co_num") = NULL end if if trim(co_ext) "" then rs("co_ext") = co_ext else rs("co_ext") = NULL end if rs("fname") = fname rs("lname") = lname rs("co_fname") = co_fname rs("co_lname") = co_lname if trim(p_area) "" then rs("p_area") = p_area else rs("p_area") = NULL end if if trim(p_ex) "" then rs("p_ex") = p_ex else rs("p_ex") = NULL end if if trim(p_num) "" then rs("p_num") = p_num else rs("p_num") = NULL end if if trim(w_area) "" then rs("w_area") = w_area else rs("w_area") = NULL end if if trim(w_ex) "" then rs("w_ex") = w_ex else rs("w_ex") = NULL end if if trim(w_num) "" then rs("w_num") = w_num else rs("w_num") = NULL end if if trim(m_area) "" then rs("m_area") = m_area else rs("m_area") = NULL end if if trim(m_ex) "" then rs("m_ex") = m_ex else rs("m_ex") = NULL end if if trim(m_num) "" then rs("m_num") = m_num else rs("m_num") = NULL end if rs("primary_phone") = primary_phone rs("address1") = address1 rs("address2") = address2 rs("city") = city rs("state") = state1 rs("zip") = zip rs("country_id") = country_id rs("app_date") = appdatetime if trim(apphour) "" then rs("app_hour") = apphour else rs("app_hour") = NULL end if if trim(appminute) "" then rs("app_min") = appminute else rs("app_min") = NULL end if if trim(appampm) "" then rs("app_ampm") = appampm else rs("app_ampm") = NULL end if rs("confirmed") = confirmed rs("fee") = fee rs("notarizations") = notarizations if trim(od_begining) "" then rs("od_begining") = od_begining else rs("od_begining") = NULL end if if trim(od_end_leg) "" then rs("od_end_leg") = od_end_leg else rs("od_end_leg") = NULL end if if trim(od_end_rt) "" then rs("od_end_rt") = od_end_rt else rs("od_end_rt") = NULL end if rs("inb_doc_delivery_id") = inb_doc_delivery_id if trim(delivery_company_id1) "none" then rs("delivery_company_id1") = delivery_company_id1 else rs("delivery_company_id1") = NULL end if if trim(tracking_num1) "" then rs("tracking_num1") = tracking_num1 else rs("tracking_num1") = NULL end if if trim(delivery_company_id2) "none" then rs("delivery_company_id2") = delivery_company_id2 else rs("delivery_company_id2") = NULL end if if trim(tracking_num2) "" then rs("tracking_num2") = tracking_num2 else rs("tracking_num2") = NULL end if rs("comments") = comments rs("notes") = notes rs("actdate") = date 'rs("invoicedate") = date rs("status") = "pending" rs.update rs.close Set RS = Nothing Response.Redirect("calendar.asp")
VIEWS ON THIS POST

210

Posted on:

Saturday 10th November 2012
View Replies!

SQL server address?

Is there any to find out the name of the SQL server that a particular DB driven website is using (example: www.mysite.com is pulling info from WhatSITE.com)
VIEWS ON THIS POST

152

Posted on:

Saturday 10th November 2012
View Replies!

additional problem deleting dbs ( publication)

hi now i'm able to delete any dbs even if other user are connected, but if there is a replication (publication) concerned with this dbs it won't delete so how can i find out with sql-dmo whether there is a replication installed on this dbs
VIEWS ON THIS POST

253

Posted on:

Saturday 10th November 2012
View Replies!

add database to server

I am writing an ASP page on my computer running win98 with pws .the connect to the database in acceess its very good (with the ODBC). but how i can put oll my site with database in this server with html and js its ok but,with the asp ,database how i can do this.in my computer after setting ODBC and driver of microsoft access evrything good .helppppppppppppppppppppppppp
VIEWS ON THIS POST

169

Posted on:

Saturday 10th November 2012
View Replies!

How to add in Sql Database

I am very worried , bocz i can not add picture in Sql data base.Pls help me.....quickly....(with access queury)
VIEWS ON THIS POST

136

Posted on:

Sunday 11th November 2012
View Replies!

Static IP public address

I have a server with some tables on SQL and I need then to be accessed from outside. I already opened the ports on the router but when the internet goes down for a while or I restart the server I lost the public address. Is there any way to have a static one\t so I dont loose on this cases...
VIEWS ON THIS POST

272

Posted on:

Sunday 11th November 2012
View Replies!

Getting error to Connect MS-SQL2005 from remote desktop(using public IP address) connection to DotNet windows application

I have a dot net windows application which can be download from the website. I want to use the database for the application by using public IP address. I am not able to connect SQL server 2005 from remote connection it is giving me the error, SQL server does not allow remote connection. I changed my server remote connection configuration to Local and remote connection using both TCP/IP and named pipes but still i am getting the error. please help me
VIEWS ON THIS POST

417

Posted on:

Monday 19th November 2012
View Replies!

Store Procedure - Add new user - check before adding - return value if taken

Below is the basic stored procedure that I will use but I need to know how to return a value if the username/password is already taken. Code: Create Procedure amep_insertnew @username As datatype, @password As datatype As IF NOT EXISTS ( SELECT field1 FROM tablename WHERE field1 = @username AND field2 = @password ) BEGIN INSERT INTO tablename (field1, field2) VALUES @username, password) END
VIEWS ON THIS POST

180

Posted on:

Tuesday 20th November 2012
View Replies!

The data types varchar and text are incompatible in the add operator.

I get the following error: The data types varchar and text are incompatible in the add operator. when I execute the following: SELECT Title FROM vtdThesisInfo WHERE Title like '%'+ @searchCriteria + '%' (it's a stored procedure). I am using SQL Server 2005
VIEWS ON THIS POST

221

Posted on:

Tuesday 20th November 2012
View Replies!

SQL Slow on Godaddy, any optimization fix?

I've transfered a site recently from reinvent hosting to godaddy, the site works, but the pages that retrieve ms sql (2005) queries now load about 5-8 seconds longer than they did on reinvent (which was basically instantly)... the guy who i talked to at godaddy said that i need to change the links on the site from external linking to internal linking... as far as i understand it all the links are linking internally (not using somedomain.com/page.aspvar=param.... but using var=param, or page2.aspvar=param), unless there's a different use of the term that i'm not familiar with... anyway i'm confused what he meant by it... and the asp seems to be structured ok (and as mentioned the sql did work perfectly fine on another hosting).. it connects to the db, retrieves the data and puts it into the array, then loops the array for printing to page... then closes the array/db.. i think that should work perfectly fine as it did on the other hosting... but does anyone out there know a solution to fix this on godaddy hosting, they say it's nothing with their sql server as they checked it and it's fine... here's the site: pccti.com ... and the slowness is when retrieving the healthcare/IT courses and then also displaying course details... please help
VIEWS ON THIS POST

133

Posted on:

Tuesday 20th November 2012
View Replies!

How to use sessionstate mode = 'stateserver' in GoDaddy Grid hosting

i saw some godaddy worker replied post at this forum so i wanna register and try to get help from here if you know how to use this sessionstate mode at goddady pls let me know i need syntax
VIEWS ON THIS POST

248

Posted on:

Tuesday 20th November 2012
View Replies!

how to add default value

I need to add a field to an table in sql db that has to have a default value. HOw can I assing the default value to a field in a table please
VIEWS ON THIS POST

134

Posted on:

Tuesday 20th November 2012
View Replies!

How to add a Column Description by code?

Thanks AD
VIEWS ON THIS POST

147

Posted on:

Tuesday 20th November 2012
View Replies!

sql connection problem with ip address

This works: connStr = "Driver={SQL Server};" &_ "Server=MachineName\InstanceName;Database=MyDataba se;" &_ "Uid=MyId;Pwd=MyPwd;" This doesn't: connStr = "Driver={SQL Server};" & _ "Server=192.168.0.102\InstanceName,1433;" & _ "Database=MyDatabase;" & _ "Uid=MyId;" & _ "Pwd=MyPwd" Why
VIEWS ON THIS POST

198

Posted on:

Tuesday 20th November 2012
View Replies!

Insert trigger causes "the data was added to the database but ..." error

dear friends ! could you please help me ! i have a sql server 2005 database and an ms access project. as soon as i added this trigger to a table SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER trg_insert_building ON tbl_building AFTER INSERT AS declare @buildind_id int BEGIN SET NOCOUNT ON; select @building_id = inserted.id from inserted insert into tbl_bf (building_id, foundation_id) select @building_id as bilding_id, id from tbl_foundation END GO i started getting the following message: microsoft office access: the data was added to the database but the data won't be displayed in the form because it doesn't satisfy the criteria in the underlying record source.
VIEWS ON THIS POST

206

Posted on:

Tuesday 20th November 2012
View Replies!

how to addd one to one reletionship between 2 table ?

Hi i wonder if i can add one to one reletionship between 2 tables in sql server 2000 just like access 2000. I be happy if some one teach me how. IN the links below is the pics of my tables.I want to add one to one reletionship between players table and teams
VIEWS ON THIS POST

229

Posted on:

Tuesday 20th November 2012
View Replies!

Help with date functions - dateadd

. Thought this would be an easy dateadd function but I cant get it to work! Background: Using ASP.Net, VB.NET with SQl server 2000 DB. I have a table i need to query where I want to display all records between a user defined time and a pre defined time i.e Display all records between Now and 30 mins time OR Display all records between [user entered parameter i.e. 15:00] and 1 hour after user defined parameter. I want to have the user select in a drop down the time to query from and the amount of time after that. I hope I have explained that well enough! ALL records in the table are in the format 01/01/2005 12:00:00 i.e. there are different times throughout the day, and all of them are on the same day. On another point is there any way to change this is stored, I only want to bother with time, not dates, at the moment i convert before i display these values. anyway back to the problem, I have tried the following which I thoguht would work: Code: SELECT * FROM tblTimetable where sourcetime between getdate() and dateadd(hh,01,getdate()) Where sourcetime is a datetimefield with a typical value: 01/01/2005 12:00:00 obviously the getdate() function will show the date and time now today, so how can I get this to work
VIEWS ON THIS POST

253

Posted on:

Tuesday 20th November 2012
View Replies!