-
[Geek] reading excel into a web form
Date: 10/10/05
(Asp Dot Net) Keywords: database, sql, web
I have been told we need to make a feature that will
allow the user to upload an excel spreadsheet (this
will always be formatted in the same was) to the server
then on postback link to the spreadsheet and read the
information from specific cells out into a web form
which can be checked before submission by web form
to the sql server database.
I've never done this before i am fairly sure that i
can connected to a excel spreadsheet as a datasource
*hopes with fingers crossed* but can i specify individual
cells to write from? how difficult is to specify which
worksheet your wanting information from etc
I am going to look into it on the web later but if anyone
has any ideas or has done something similar i'd very
much appreciate any help with this, I did in the past
have to attempt connecting to a excel sheet which
didn't go well.
Source: http://www.livejournal.com/community/aspdotnet/43534.html
-
Programming a Tag Function
Date: 10/10/05
(PHP Community) Keywords: programming, mysql, database, sql
Most of us are aware of the function Live Journal has to assign "tags" to journal entries. I have also seen Flickr.com do this and use as a path for search and browsing (Pretty cool).
As far as I can tell this is just a list of keywords, probably stored as a Text Blog per journal entry (Live Journal) or per image (Flicker).
How would you go about programming a tag function? I am not looking for code, but rather logic steps.
EDIT: BTW the database will be MySQL.
From the initial response, I see a BLOG isnt the way to go. Also, let me give a little more detail: the function I am building will also function kinda like Live Journal's Interests where a user will list interests and then be matched up to the tags (keywords) of other database entries (not necessarily other users).
Source: http://www.livejournal.com/community/php/353398.html
-
Nulls and SQL
Date: 10/10/05
(Asp Dot Net) Keywords: browser, database, sql
Okay this has been bothing me for some time now
whenever i am working with the database (ms-sql 2k)
i keep running into problems with nulls and empty
values, I am passing an empty string into the db
and its fine i pass it through my string cleaner
function and it can't find the value its trying to
enter also with number field unless theres a value
in it the it crashes with the same error my sting
cleanner causes ... what am i doing wrong
### String cleaner function ###
Function Strip_SQL(ByVal strValue as String)
Dim ModStrValue As String
' the values replacing the char values are actually ascii and are rended by the browser here
Dim ModStrValue1 As String = replace(strValue,vbCrLf,"[br/]")
Dim ModStrValue2 As String = replace(ModStrValue1, chr(34),""")
Dim ModStrValue3 As String = replace(ModStrValue2, chr(9)," ")
Dim ModStrValue4 As String = replace(ModStrValue3, chr(13),"[BR/]")
Dim ModStrValue5 As String = replace(ModStrValue4, chr(39),"'")
Dim ModStrValue6 As String = replace(ModStrValue5, chr(40),"(")
Dim ModStrValue7 As String = replace(ModStrValue6, chr(41),")")
Dim ModStrValue8 As String = replace(ModStrValue7, chr(61),"=")
Dim ModStrValue9 As String = replace(ModStrValue8, chr(64),"@")
Return ModStrValue9
End Function
### how the function is places on the request ###
Dim editorial As String = Strip_SQL(Request.Form("editorial"))
### passing the variable to codebehind ###
Dim EditAdminResort As New Devotion2Motion.AdminComp()
EditAdminResort.EditResort(editorial )
### The function that passes the variable to the query ###
Public Function EditResort(ByVal editorial As String)
' Create Instance of Connection and Command Object
Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("strConn"))
Dim myCommand As New SqlDataAdapter("sp_call_Resort_Update", myConnection)
' Mark the Command as a SPROC
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure
' Add Parameters to SPROC
Dim parametereditorial As New SqlParameter("@editorial ", SqlDbType.nVarChar, 4000)
parametereditorial .Value = editorial
myCommand.SelectCommand.Parameters.Add(parametereditorial )
' Create and Fill the DataSet
Dim myDataSet As New DataSet()
myCommand.Fill(myDataSet)
' Return the DataSet
Return myDataSet
End Function
### the error ###
System.Data.SqlClient.SqlException: Procedure 'sp_call_Resort_Update' expects parameter '@editorial ', which was not supplied.
Source: http://www.livejournal.com/community/aspdotnet/44011.html
-
INI handling functions... They were nonexistent as far as I knew...
Date: 10/11/05
(PHP Community) Keywords: php, mysql, database, sql, web
This has irked me for some time: The lack of INI handlers in PHP.
I was moving my website around from host to host, until I settled, and needed a universal standard that I could write on and rely on that would work anywhere as I really wouldn't have a MySQL database everywhere I went. So I wrote this up after not finding a shred of a command for userlevel INI file handling. INI.Lib (Last Built Oct. 3rd, 2004)
I hope some other people can make some use out of it as well I was able to. If you see any major errors or when you use it you can't for the life of you get past a certain bug, let me know and I will see if this one is any real difference from my current build (Apr. 3rd 2005). I may have just patched up a few commands here and there with my build that I caught in the original code and done a few optimizations. If anyone wants the current build, go ahead and drop me a line to cynagen at cynagen dot com, and I'll be more than happy to send you a copy of the current copy on my server; if enough of you report problems, I'll just repackage my current build and post that instead.
(X-Posted on October 10th 19:54)
Source: http://www.livejournal.com/community/php/353909.html
-
INI handling functions... They were nonexistent as far as I knew...
Date: 10/11/05
(PHP Development) Keywords: php, mysql, database, sql, web
This has irked me for some time: The lack of INI handlers in PHP.
I was moving my website around from host to host, until I settled, and needed a universal standard that I could write on and rely on that would work anywhere as I really wouldn't have a MySQL database everywhere I went. So I wrote this up after not finding a shred of a command for userlevel INI file handling. INI.Lib (Last Built Oct. 3rd, 2004)
I hope some other people can make some use out of it as well I was able to. If you see any major errors or when you use it you can't for the life of you get past a certain bug, let me know and I will see if this one is any real difference from my current build (Apr. 3rd 2005). I may have just patched up a few commands here and there with my build that I caught in the original code and done a few optimizations. If anyone wants the current build, go ahead and drop me a line to cynagen at cynagen dot com, and I'll be more than happy to send you a copy of the current copy on my server; if enough of you report problems, I'll just repackage my current build and post that instead.
(X-Posted on October 10th 19:54)
Source: http://www.livejournal.com/community/php_dev/61141.html
-
favorite benchmark utility?
Date: 10/12/05
(MySQL Communtiy) Keywords: php, mysql, sql, apache
I'd like to hear what (if any) you all use for benchmarking.
I'm currently doing some benchmarks for dynamic content on a php/mysql setup between Apache and LightTPD. I'm currently using "siege" but it's not working out as well as I hoped. Any application suggestions are welcome. :D
thanks!
Source: http://www.livejournal.com/community/mysql/70392.html
-
verification
Date: 10/14/05
(PHP Community) Keywords: mysql, sql
I'm trying to do something like:
//Part of code
$data = mysql_fetch_array($result);
if($data['userName']==$userName) {
echo "This user name already exists!
Go back and try another one.";
exit;
So, as you may guess, I need the script to verify if the user with such userName already exists. If not - proceed with the registration.
Unfortunately, it seems to say that there's already one such account even if some part of the inputted user name coincide, and I need the rejection of newly entered name only if it's the same as existing one on 100%, not partially.
Does someone know how could this be managed?
Source: http://www.livejournal.com/community/php/355113.html
-
Web 2.0 and open source
Date: 10/14/05
(Open Source) Keywords: mysql, sql
Cut through the PR-speak and it reads to me like concern, caution, watch it. Oracle could always buy mySQL, too.
Source: http://blogs.zdnet.com/open-source/?p=470&part=rss&tag=feed&subj=zdblog
-
seek, in a field
Date: 10/14/05
(SQL Server) Keywords: sql
Is there an equivalent to the SEEK command in T-SQL?
In other words, I need
SELECT left (some_column, number_of_characters_until_you_hit_the_first_space_[which_is_not_uniform]) FROM some_table
Source: http://www.livejournal.com/community/sqlserver/36422.html
-
free space..
Date: 10/15/05
(Web Hosts) Keywords: sql, web
Free webspace to anyone that knows how to design and wants to build a personal / photographic website.
Just go to the site jenepher.com/x and fill out the form. I will send you your log in information after I set up your FTP account. If you have any questions just email them to me at bratusek@jenepher.com
-20 Mb of space
-unlimited bandwidth
-no pop ups
-no cgi
-no sql
Source: http://www.livejournal.com/community/webhosts/31628.html
-
A quick way to update a lot of rows
Date: 10/15/05
(PHP Community) Keywords: mysql, sql
I've got a list of files in a mysql table. One of the fields is the full path to the file (minus the drive letter). I would like to change the data in that field to just the top level folder rather than full path. Basically I want to get rid of everything after (and including) the first \.
The trouble is I have nearly 18000 records.
What's the quickest & easiest way to go about this?
Source: http://www.livejournal.com/community/php/355676.html
-
JOIN, JOIN LEFT
Date: 10/18/05
(MySQL Communtiy) Keywords: mysql, sql
Hello,
I've never used JOIN
before and I am having some problems.
I have two tables invoice_main, clients
Invoice Main does not have the client's name in it, only their ID number. My project manager is asking to sort the names alphabetically. I thought I could grab the last name out of clients
and append it on to invoice_main
.
This is my query:
SELECT invoice_number, invoice_date, due_date, clientid, subtotal, paid_amounts, payment_status, ClientLast
FROM invoice_main
LEFT JOIN clients ON invoice_main.clientid=clients.ClientID
WHERE office_id='1'
ORDER BY ClientLast
This is the MySQL error
Column: 'clientid' in field list is ambiguous
SOLVED
Corrected query:
SELECT invoice_number, invoice_date, due_date, invoice_main.clientid, subtotal, paid_amounts, payment_status, ClientLast
FROM invoice_main
LEFT JOIN clients ON invoice_main.clientid=clients.ClientID
WHERE invoice_main.office_id='1'
ORDER BY ClientLast
By the way, yes its clientid in one table and ClientID in the other. I didn't create the tables and we are way too far into the project, near the end, to fix it.
Source: http://www.livejournal.com/community/mysql/70503.html
-
moving the database.
Date: 10/19/05
(MySQL Communtiy) Keywords: mysql, sql
I have the RDBMS installed in the "C:\mysql" drive of my server, is there a way to "move" the data to say the "E:\mysql" without having to reinstall the whole RDBMS and reimport the data?
Source: http://www.livejournal.com/community/mysql/70860.html
-
Need help with C# .NET and SQL Server with SJIS
Date: 10/26/05
(C Sharp) Keywords: sql
I'm using SqlCommand and want to store SJIS encoded japanese into a table on SQLServer.
I get ?????? instead of the Japanese characters or the hex/binary. It's 3F3F3F3F and defaulted code for misunderstood characters. I need something that will preserve the code. I'm using NTEXT and stored procedure mode.
Any ideas/experience in this area?
Source: http://www.livejournal.com/community/csharp/39697.html
-
mysql_connect() not connecting, everything's right though.
Date: 10/27/05
(PHP Community) Keywords: php, mysql, database, sql, web
Well guys, I'm truly stumped, and I don't know if you guys can even help me. I've exhausted everything so far, though, so I'm going to try it anyway.
Basically I have this:
which should work just fine as all my other statements are written exactly like that (to interface with my web database) and they work just fine.
I get this error, instead:
Warning: mysql_connect(): Lost connection to MySQL server during query in /data/htdocs/world/RegularSites/iop/events_forum_search.php on line 258
Could not connect
The only thing I can think of that would matter would be that it's a SQL database I'm trying to connect to, and not a MySQL, but there is not sql_connect function or anything like that, only ms sql and m sql... can someone give me some advice on this matter? I'm desperate and under a deadline!
Thanks in adddddddvance!
Source: http://www.livejournal.com/community/php/359304.html
-
Dreamweaver...PHP..MYSQL...LJ ICONS
Date: 10/29/05
(WebDesign) Keywords: php, mysql, database, sql
I want to enter in the locations of each of the LJ Icons I make in a MYSQL database...then have them displayed in rows using PHP....and just a note...I have Dreamweaver MX 2004 but can only get them going down in a column.
Any ideas?
Source: http://www.livejournal.com/community/webdesign/1005594.html
-
VS 2005 released
Date: 10/30/05
(C Sharp) Keywords: sql
MSDN subscribers had a notice last night when they logged in.
VS 2005 and the corresponding Sql Server 2005 and .Net 2.0 redist have been released.
Source: http://www.livejournal.com/community/csharp/40183.html
-
Executing code twice
Date: 10/30/05
(PHP Community) Keywords: cms, php, mysql, html, database, sql
I have come across a problem that is driving me mad. I have a php and MySQL CMS and I have a page that extracts the age content (html) out and plops it into the template file and all is sent back to the user. I have now come to the point when I would like to stop some php amongst the body html that is stored for each id in the database. The problem is how to have it recognised as php and then run.
So at the moment, I just extract the in from the database and copy it into a field: $body=$row['body'];
This is then in turn put in the template. I would however like to have this code run and then the result (so the html, plus whatever else has been generated in the middle) is then copied into a field ready for insertion into the template.
Does anyone know of a way to do this? I have seen ways that are meant to have worked, but as yet have not, but I don’t want to note them down as they may cloud people’s ideas.
Thanks for any help.
Source: http://www.livejournal.com/community/php/360920.html
-
FYI for MSDN Subscribers
Date: 10/31/05
(Asp Dot Net) Keywords: sql, microsoft
Microsoft just released Visual Studio 2005 and SQL Server 2005 for MSDN subscribers to Download (universal ones at least)
Source: http://www.livejournal.com/community/aspdotnet/45932.html
-
Now I'm really screwed.
Date: 11/02/05
(Web Development) Keywords: php, mysql, software, html, technology, database, sql, security, apache
This is a follow up to the post I made before regarding this database connection problem I'm having. (http://www.livejournal.com/community/php/359304.html)
After receiving responses from people that suggested I install the MS SQL PHP functions, I inquired with my IT contact (we are a large institution and therefore have ridiculous amounts of red tape to deal with) as to whether or not they could be installed.
This is what I was told:
We do not support MSSQL odbc connection on our Sun Solaris server running Apache. mssql_connect would require a staff member who knows the technology, purchase of licensed software (which we do not have), and recompiling of Apache that may potentially break other users code. Also, there would be MSSQL security issues if we were to open up or authorize connections to it from our Sun Server, we host a variety of departmental databases on that SQL server, that could be a potentially serious problem if any of our other databases we to be compromised. Sorry for the inconvenience, but that is the story.
If I can't connect to that database, the entire project that I'm working on is going to be fucked and I have a 11/21 deadline. I need to know two things, if any of you can discern from all of this:
1. Is it EVER going to be possible for me to connect to that database? Or should I just stop wasting my time and create another for my personal use?
2. If it is possible, can someone tell me how? :(
Thanks everyone.
Cross posted to PHP/MySQL communities.
Source: http://www.livejournal.com/community/webdev/263959.html