Is there a library for those going the g++ route?
I've just discovered MinGW + Qt and if I can find something really good for SQL or ODBC, then I can say goodbye to Microsoft dependency.
The only thing I don't want to do is waste a bunch of days and have learner's remorse.
User Profile
Collapse
-
C++ library for SQL/ODBC (non VC++)
-
List a number of fields
I've often wanted to just list the first 5 or 10 fields in a select statement without typing their names out all the time. If I use "*", it's usually too wide for the sql client.
Is there any way to just say "SELECT <the first five fields> from mytable"?
Thanks for any help. -
I found an alternative.
1. Edit the file "/etc/my.cnf":
Under "[mysqld]", enter "max_allowed_pa cket=100000000M "
2. Then use command:
mysql -p'<password>' --max_allowed_pac ket=10000000M <database_nam e> < "/home/<user>/Desktop/<upload_file>.s ql" -
Got a packet bigger than 'max_allowed_packet' error
Okay...
I got this error, so I thought, fine, I'll change the max_allowed_pac ket variable.
So, I went to the documentation, and found this
http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
But, the command it gives you for changing the packet size variable doesn't work.
This command:
Code:mysqld --max_allowed_packet=32M
-
Converting an .SQL file to CSV/TSV with apache?
Apparently you can use Apache (or an Apache product?) to take .SQL database backup files and turn it into a CSV file.
Would it be easier to install MySQL, then execute the SQL backup file, then export from the database? Or does apache have something neat that converts it directly? -
Thanks for the help.
How would I do this? Can I get the insert statement to return fields after it has been executed?
I'm using ASP....Leave a comment:
-
Best practice for inserting many to many records
This is the way I do this:
Tables:
Departments
Departments_to_ employees
Employees
Add employee function:
-Lock employee table
-Insert employee
-Search for last employee record to find newly added employee ID
-Unlock employee table
-Insert employee id and department id into Departments_to_ employees table
There has got to be a better way of doing this.... -
-
You assumed that the relationship was one-to-many. That would be easy. But, this scenario is a many-to-many relationship. An employee can have more than one department and a department can have more than one employee.
Department_to_e mployee is a lookup table....Leave a comment:
-
how to find maximum occurences of distinct value?
Say we have a couple of tables like so:
Departments_to_ Employees
department_id
employee_id
Employee
employee_id
I want to find how many employees the department with the maximum amount of employees has.
On other words, I want to find the department with the most amount of employees, then find out how many employees are in that department.
Is there any... -
The inner join you used wasn't exactly what I needed, but it put me on the right path. Thanks for the help :)Leave a comment:
-
I'll develop my question a little better.
I'm looking to display all the categories with the reports listed underneath them. A report can be listed in multiple categories. So, a report might show up in more than one category list.Leave a comment:
-
I'm not sure I understand exactly. I know that anything between <%%> brackets will run asp like so:
Code:<% response.write "Hello from ASP!" %>
Code:<% <script type="vbscript"> document.write("Hello from VBScript!") </script> %>
Leave a comment:
-
Am I missing something about join tables?
Say I have a database like so:
Code:USER user_id user_name REPORT report_id report_name CATEGORY category_id category_name USER_TO_REPORTS user_id report_id REPORT_TO_CATEGORY report_id category_id
-
Secure injection defense functions.
I'm looking to make a few asp functions to defend against attacks. The function will loop through an array, checking each item against the incoming statement. So, my question is, what are all the things I need to check for in my incoming statement?
Here are my arrays:
Code:SQLCheck=array("select", "drop", ";", "--", "insert", "delete", "'")
-
I realize now that VBScript is a CLIENT SIDE script, meaning it was only intended to run in internet explorer. Basically, it's just Microsoft's answer to javascript.
Please correct me if I'm wrong.Leave a comment:
-
VBScript won't run..
I hope I'm in the right category, and assume that VBScript is a part of asp.net.
Anyways, here is the code that will not run:
Code:<html> <head> </head> <body> <script type="vbscript"> document.write("Hello from VBScript!") </script> </body> </html>
-
Ha, DrBunch,
I've tried this with no avail. This is why I went with the assumption that the record set is looking for an actual date object. But just to make sure we're talking about the same thing, this is what I did:
Insert("DATEBOR N") = "TO_DATE('1 1/11/08', 'mm/dd/08')"Leave a comment:
-
Can I insert date into oracle using addnew and update?
I like to use this method when inserting into a database:
Code:Set Insert = Server.CreateObject("ADODB.Recordset") Insert.Open "test", objConn, 1, 3, 2 Insert.AddNew Insert("FIRSTNAME") = "Joe" Insert("LASTNAME") = "bob" Insert("DATE_BORN") = "10/10/80" Insert.Update Insert.Close t RSInsert = nothing
-
Actually, I used trigger as a generic name, just for purposes of listing it here. The real name was something else.
But, I've solved the problem. Apparently, this command needed a slash ("/") at the end.
Thanks anyways for the post.Leave a comment:
No activity results to display
Show More
Leave a comment: