I looked into this and it seems like this is the way to protect myself Dim sqlStatement As New Odbc.OdbcCommand("SELECT * FROM content LEFT JOIN categories ON content.category = categories.categoryid WHERE categories.cat_name = @category AND content.name = @page AND content.deleted <> '1' LIMIT...
Thanks, ca8msm, that's what I ended up doing. I wasn't sure what I needed to keep and didn't need to keep to get this to work. I think it's working now.
josie2007, thanks for the tip. I do plan on taking precautions for SQL injections, I'm just new to vb.net and it's next on my list...
Ok, so if I have a connection string and an SQL statement, how would you recommend I connect to my database, retrieve the records, and put it in format that allows me to use that section:
MyDataRow.Item("ProductName")
As shown in the example. This is the right track, I just keep having...
Ok, here are my 2 URL Rewrites:
<add url="~/(.*)default\.aspx" mappedUrl="~/$1default.aspx" />
<add url="~/(.*)/(.*)\.aspx" mappedUrl="~/content.aspx?c=$1&p=$2"/>
but I just need 1 thing: I want the URL to rewrite like this:
mydomain.com/category/
to...
I went through and tried to use the example, but I ended up getting a Null value for my dataTable. I think it's because
This: Dim MyDataAdapter = New SqlClient.SqlDataAdapter(strSQL, MyConnection)
Doesn't produce the same result as
this: Dim oDataAdapter As ODBCDataAdapter = New...
OK, I looked at those examples and still am a bit lost. I actually found a different example that seems to work ok, so I will probably just use it.
DS1.ConnectionString = sConString
Dim category As String = Request.QueryString("c")
Dim page As String = Request.QueryString("p")
Dim sSQL As String...
I'm sorry, I'm new to ASP.NET and VB and I don't even know where to start. I don't know what to look for.
Here's what I'm trying to accomplish: I'm trying to get one or two field from my datasource and put it into a literal on the page. I'm storing my website in the database as HTML and need it...
I'm using an ODBC Adapter with a MySQL Data connection to retrieve information from my database, and the example I was given doesn't quite explain how to get the data into an array as well as the total records retrieved. All I have is:Dim category As String = Request.QueryString("c")
Dim page As...
Ok, maybe this will help. I think I found a better one that uses RegEx, and it's it uses the web.config file. The setup is like this:
<add url="~/(.*)default\.aspx" mappedUrl="~/$1default.aspx" />
<add url="~/search\.aspx?q=(.*)" mappedUrl="~/search.aspx?q=$1" />
<add url="~/(.*)/(.*)\.aspx"...
Hey Aptitude,
Thanks for helping me out. I tried to use that XML and the system didn't like it. I guess it thinks the <SearchText> is an XML tag. I get: Exception Details: System.Xml.XmlException: The 'SearchText' start tag on line 8 does not match the end tag of 'url'. Line 8, position 35...
I have tried and tried to understand how this works, and I cannot figure out for the life me 1: Regular Expressions and 2:How to format them for URL-Rewriting.
I'm using some code I found online that does URL-rewriting but I don't know how to set up my rules. Here's an example:
<rule...
I have 2 tables and I would like to run 1 query to pull data out of both tables. I guess it would be some sort of join. I have 1 table with a huge list of songs, all with a category associated with each song.
I have another table that has a list of categories that the user wants to show up in...
In my example, the only reason I had NOTHING in the "diagram" was to show that the original table did not have a value I wanted to copy over with the records into the userid field. I do however would like to add a value for the new field, based on the current logged in user.
so i guess to...
It's not a matter of finding a way to get the records into the table, but more of a question as to HOW I can insert the records from 1 table into another AND include 1 field additionally.
_______________
_brian.
I've created a table called `temp` and I want to move all the rows in `temp` to `songs` based on:
`temp`.`title` -> `songs`.`title`
`temp`.`artist` -> `songs`.`artist`
`temp`.`catalog` -> `songs`.`catalog`
NOTHING -> `songs`.`userid`
There is no field in the temp table that has this value, i...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.